Documentation for `GetErrorTable` Method
The `GetErrorTable` method returns a list of `ErrorData` objects representing the current errors in the system. Each `ErrorData` object contains information about the time the error occurred, error type, device code, error message, and any additional information.
Parameter Descriptions
1. Time
- Type: DateTime
- Description: The timestamp indicating when the error occurred.
2. ErrorType
- Type: int
- Description: An enumeration representing the type of error. Examples include:
- 1: Camera connection error
- 2: Camera ping error
- 3: Camera missing
- 4: Configuration corrupted
- 5: Configuration missing
- 6: Halcon license missing
- 7: Free space missing
3. DeviceCode
- Type: int
- Description: Identifies the device associated with the error.
- Values below 100 indicate a camera (e.g., 1 for Camera 1).
- 100 represents the PC.
4. Message
- Type: string
- Description: A descriptive message providing details about the error.
5. Additional
- Type: string[]
- Description: An optional list of strings containing additional data relevant to the error. For example: For free space errors, this may include the amount of space needed (in bytes).
Examples
Below are examples of the JSON returned by the GetErrorTable method for different error types.
Example 1: No Error
[]
Example 2: Camera Connection Error
[
{
"Time":"2024-12-06T10:15:30",
"ErrorType":1,
"DeviceCode":1,
"Message":"Camera connection error: Device 1",
"Additional":[
]
}
]
Example 3: Camera Ping Error
[
{
"Time":"2024-12-06T10:16:00",
"ErrorType":2,
"DeviceCode":2,
"Message":"Camera ping error: Device 2",
"Additional":[
]
}
]
Example 4: Camera Missing
[
{
"Time":"2024-12-06T10:16:30",
"ErrorType":3,
"DeviceCode":3,
"Message":"Camera missing: Device 3",
"Additional":[
]
}
]
Example 5: General Configuration Corrupted
[
{
"Time":"2024-12-06T10:17:00",
"ErrorType":4,
"DeviceCode":100,
"Message":"Configuration corrupted: Device 100",
"Additional":[
]
}
]
Example 6: Configuration Missing
[
{
"Time":"2024-12-06T10:17:30",
"ErrorType":5,
"DeviceCode":100,
"Message":"Configuration missing: Device 100",
"Additional":[
]
}
]
Example 7: Halcon License Missing
[
{
"Time":"2024-12-06T10:18:00",
"ErrorType":6,
"DeviceCode":100,
"Message":"Halcon license missing: Device 100",
"Additional":[
]
}
]
Example 8: Free Space Missing
[
{
"Time":"2024-12-06T10:18:30",
"ErrorType":7,
"DeviceCode":100,
"Message":"Free space missing: Device 100",
"Additional":[
"5000000000"
]
}
]
Example 9: Multiple Errors
[
{
"Time":"2024-12-06T10:19:00",
"ErrorType":1,
"DeviceCode":1,
"Message":"Camera connection error: Device 1",
"Additional":[
]
},
{
"Time":"2024-12-06T10:19:30",
"ErrorType":2,
"DeviceCode":1,
"Message":"Camera ping error: Device 1",
"Additional":[
]
},
{
"Time":"2024-12-06T10:20:00",
"ErrorType":7,
"DeviceCode":100,
"Message":"Free space missing: Device 100",
"Additional":[
"100000000"
]
}
]