7.2 PtLogbookType definition
The PtLogbookType provides access to diagnosis information provided by ObjectTypes derived from the PtFunctionType.
| Attribute | Value | ||||
| BrowseName | PtLogbookType | ||||
| IsAbstract | False | ||||
| References | Node Class | BrowseName | DataType | TypeDefinition | Other |
|---|---|---|---|---|---|
| Subtype of the 0:BaseObjectType defined in OPC 10000-5. | |||||
| 0:HasComponent | Variable | LogEntries | PtLogEntryDataType[] | 0:BaseDataVariableType | M, RO |
| 0:HasProperty | Variable | LogbookSize | 0:UInt16 | 0:PropertyType | M, RO |
| 0:HasComponent | Method | ClearLogbookEntries | O | ||
| 0:HasComponent | Method | GetFilteredLogbookEntries | O | ||
| 0:HasComponent | Method | GetCurrentDiagnosis | O | ||
| 0:HasComponent | Method | GetActiveDiagnosis | O | ||
| 0:HasComponent | Method | GetHistoricDiagnosis | O | ||
| Conformance Units | |||||
|---|---|---|---|---|---|
| Powertrain Logbook Readable | |||||
| Powertrain Logbook Events |
The LogEntries array Variable consists of PtLogEntryDataType structure elements. The array is limited to the maximum size specified by the LogbookSize Property. The array contains PtLogEntryDataType elements for events and starts with the most recent event (the element with the most recent EventComing timestamp). If the Server maintains different fault situations in its diagnosis system, faults (events) which are still present after an acknowledge generate a new entry in the actual fault situation causing more than one entry with the same EventNumber for one event.
The LogbookSize Property contains the maximum length of the LogEntries array. The actual length of the array may be smaller.
Clients must lock the parent PtFunctionType Object before invoking a Method of the PtLogbookType Object.
7.2.1 ClearLogbookEntries Method
The ClearLogbookEntries Method clears the LogEntries array and resets the diagnosis system of the functional Object. The security constraints defined in chapter 6.2 apply.
Signature
ClearLogbookEntries (
);
The Method Result Codes (defined in Call Service) are defined in Table 39.
| Result Code | Description |
| Good | The Method execution was successful. |
| Bad_UserAccessDenied | The user has not the right to execute the Method. |
| Bad_UnexpectedError | The Server is not able to execute the function because an unexpected error occurred. The Device might be temporarily unavailable or unreachable due to network failure. |
7.2.2 GetFilteredLogbookEntries Method
The GetFilteredLogbookEntries Method returns a LogEntries array matching the filter criteria. Method invocation shall be possible for all users (read-only).
Signature
GetFilteredLogbookEntries (
[in] 0:Byte LogbookFilterOptions,
[in] 0:Byte FaultSituationNumber
[in] PtEventTypeEnumeration EventType,
[in] PtEventClassEnumeration EventClass,
[in] 0:Int32 VendorEventCode
[in] 0:Duration EventAppearanceInterval,
[out] PtLogEntryDataType[] FilteredLogEntries
);
| Argument | Description |
| LogbookFilterOptions | Parameter restricting the returned logbook entries to those having valid EventGoing and/or EventAcknowledged timestamps. If set to 1 ("GOING" filter), only logbook entries with valid EventGoing timestamp are returned. If set to 2 ("ACKNOWLEDGED" filter), only entries with valid EventAcknowledged timestamp are returned. If set to 3, the logic applied is "AND": only logbook entries meeting both filter criteria are returned. Set to 0 if no filtering shall be applied. If a value greater than 3 is passed, the Method Result Code shall be set to Bad_InvalidArgument. |
| FaultSituationNumber | Restricts the returned logbook entries to those with the FaultSituationNumber field equal to this parameter. Passing 255 means "don't care". |
| EventType | Restricts the returned logbook entries to those with the EventType field equal to this parameter. It is encoded as PtEventTypeEnumeration. Passing "UNSPECIFIED" means "don't care". |
| EventClass | Restricts the returned logbook entries to those with the EventClass field equal to this parameter. It is encoded as PtEventClassEnumeration. Passing "UNSPECIFIED" means "don't care". |
| VendorEventCode | Restricts the returned logbook entries to those with the VendorEventCode field equal to this parameter. Passing -1 means "don't care" and does not restrict to entries with the VendorEventCode field set to -1. |
| EventAppearanceInterval | Time interval encoded as 0:Duration defined in [OPC 10000-3]. Restricts the returned logbook entries to those appearing within a timespan from the past up to now. The EventComing field of the logbook entries is used for checking this filter. Passing 0 means "don't care". |
| FilteredLogEntries | Array containing the logbook entries matching all filter criteria passed with the first 5 parameters. An empty array is returned if no logbook entry matches the filter criteria. |
The Method Result Codes (defined in Call Service) are defined in Table 40.
| Result Code | Description |
| Good | The Method execution was successful. |
| Bad_InvalidArgument | The Server is unable to execute the Method due to invalid arguments. For instance, the EventClass passed may be unknown. |
| Bad_UnexpectedError | The Server cannot execute the function because an unexpected error occurred. The Device might be temporarily unavailable or unreachable due to network failure. |
7.2.3 GetCurrentDiagnosis Method
The GetCurrentDiagnosis Method returns all log entries which occurred since the last acknowledge as LogEntries array. Starting with the most recent one, all log entries without valid EventAcknowledged timestamp are returned. Method invocation shall be possible for all users (read-only).
Signature
GetCurrentDiagnosis (
[out] PtLogEntryDataType[] CurrentLogEntries
);
| Argument | Description |
| CurrentLogEntries | Array containing the log entries occurred since the last acknowledge. An empty array is returned if no logbook entry matches the filter criteria. |
The Method Result Codes (defined in Call Service) are defined in Table 41.
| Result Code | Description |
| Good | The Method execution was successful. |
| Bad_UnexpectedError | The Server is not able to execute the function because an unexpected error occurred. The Device might be temporarily unavailable or unreachable due to network failure. |
7.2.4 GetHistoricDiagnosis Method
The GetHistoricDiagnosis Method returns a LogEntries array with valid EventGoing field. Method invocation shall be possible for all users (read-only).
Signature
GetHistoricDiagnosis (
[in] 0:Byte FaultSituationNumber,
[out] PtLogEntryDataType[] HistoricLogEntries
);
| Argument | Description |
| FaultSituationNumber | Fault situation number the faults belong to. 0 identifies the current situation, 1 the historic situation preceding the current situation, and so on (see explanation below). |
| HistoricLogEntries | Array containing the log entries with valid EventGoing field entry. An empty array is returned if no logbook entry matches the filter criteria. |
The Method Result Codes (defined in Call Service) are defined in Table 42.
| Result Code | Description |
| Good | The Method execution was successful. |
| Bad_InvalidArgument | The fault situation specified by FaultSituationNumber does not exist. |
| Bad_UnexpectedError | The Server cannot execute the function because an unexpected error occurred. The Device might be temporarily unavailable or unreachable due to network failure. |
7.2.5 GetActiveDiagnosis Method
The GetActiveDiagnosis Method returns a LogEntries array containing log entries belonging to the current fault situation (log entries with FaultSituationNumber equal to 0) with valid EventComing timestamp, but with missing EventGoing timestamp. The method returns a subset of the entries returned by the GetCurrentDiagnosis Method. Method invocation shall be possible for all users (read-only).
Signature
GetActiveDiagnosis (
[out] PtLogEntryDataType[] ActiveDiagnosis
);
| Argument | Description |
| ActiveDiagnosis | Array containing the log entries with missing EventGoing field entry. An empty array is returned if no logbook entry matches the filter criteria. |
The Method Result Codes (defined in Call Service) are defined in Table 43.
| Result Code | Description |
| Good | The Method execution was successful. |
| Bad_UnexpectedError | The Server is not able to execute the function because an unexpected error occurred. The Device might be temporarily unavailable or unreachable due to network failure. |