7.2 PtLogbookType definition

The PtLogbookType provides access to diagnosis information provided by ObjectTypes derived from the PtFunctionType.

Table 38 - PtLogbookType Definition
AttributeValue
BrowseNamePtLogbookType
IsAbstractFalse
ReferencesNode ClassBrowseName DataTypeTypeDefinitionOther
Subtype of the 0:BaseObjectType defined in OPC 10000-5.
0:HasComponentVariableLogEntriesPtLogEntryDataType[]0:BaseDataVariableTypeM, RO
0:HasPropertyVariableLogbookSize0:UInt160:PropertyTypeM, RO
0:HasComponentMethodClearLogbookEntriesO
0:HasComponentMethodGetFilteredLogbookEntriesO
0:HasComponentMethodGetCurrentDiagnosisO
0:HasComponentMethodGetActiveDiagnosisO
0:HasComponentMethodGetHistoricDiagnosisO
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.

Table 39 - Possible Method Result Codes
Result CodeDescription
GoodThe Method execution was successful.
Bad_UserAccessDeniedThe user has not the right to execute the Method.
Bad_UnexpectedErrorThe 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
	);
ArgumentDescription
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.

FaultSituationNumberRestricts the returned logbook entries to those with the FaultSituationNumber field equal to this parameter. Passing 255 means "don't care".
EventTypeRestricts 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".
EventClassRestricts 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".
VendorEventCodeRestricts 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.
EventAppearanceIntervalTime 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".
FilteredLogEntriesArray 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.

Table 40 - Possible Method Result Codes
Result CodeDescription
GoodThe Method execution was successful.
Bad_InvalidArgumentThe Server is unable to execute the Method due to invalid arguments. For instance, the EventClass passed may be unknown.
Bad_UnexpectedErrorThe 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
	);
	
ArgumentDescription
CurrentLogEntriesArray 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.

Table 41 - Possible Method Result Codes
Result CodeDescription
GoodThe Method execution was successful.
Bad_UnexpectedErrorThe 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
	);
	
ArgumentDescription
FaultSituationNumberFault 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).
HistoricLogEntriesArray 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.

Table 42 - Possible Method Result Codes
Result CodeDescription
GoodThe Method execution was successful.
Bad_InvalidArgumentThe fault situation specified by FaultSituationNumber does not exist.
Bad_UnexpectedErrorThe 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
	);
	
ArgumentDescription
ActiveDiagnosisArray 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.

Table 43 - Possible Method Result Codes
Result CodeDescription
GoodThe Method execution was successful.
Bad_UnexpectedErrorThe 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.