CCAux 2.19.0.0
CCAux API reference
Functions
Diagnostic functions

Functions

EXTERN_C CCAUXDLL_API DIAGNOSTICHANDLE CCAUXDLL_CALLING_CONV GetDiagnostic (void)
 
EXTERN_C CCAUXDLL_API void CCAUXDLL_CALLING_CONV Diagnostic_release (DIAGNOSTICHANDLE)
 
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV Diagnostic_getSSTemp (DIAGNOSTICHANDLE, int16_t *temperature)
 
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV Diagnostic_getPCBTemp (DIAGNOSTICHANDLE, int16_t *temperature)
 
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV Diagnostic_getPMTemp (DIAGNOSTICHANDLE, uint8_t index, int16_t *temperature, JidaSensorType *jst)
 
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV Diagnostic_getStartupReason (DIAGNOSTICHANDLE, uint16_t *reason)
 
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV Diagnostic_getShutDownReason (DIAGNOSTICHANDLE, uint16_t *reason)
 
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV Diagnostic_getHardShutDowns (DIAGNOSTICHANDLE, uint16_t *button, uint16_t *powerloss)
 
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV Diagnostic_getHwErrorStatus (DIAGNOSTICHANDLE, uint16_t *errorCode)
 
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV Diagnostic_getTimer (DIAGNOSTICHANDLE, TimerType *times)
 
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV Diagnostic_getTimerExt (DIAGNOSTICHANDLE, TimerTypeExt *times)
 
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV Diagnostic_getMinMaxTemp (DIAGNOSTICHANDLE, int16_t *minTemp, int16_t *maxTemp)
 
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV Diagnostic_getPowerCycles (DIAGNOSTICHANDLE, uint16_t *powerCycles)
 
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV Diagnostic_clearHwErrorStatus (DIAGNOSTICHANDLE)
 

Detailed Description

Functions in the Diagnostic class

Function Documentation

◆ Diagnostic_clearHwErrorStatus()

EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CrossControl::Diagnostic_clearHwErrorStatus ( DIAGNOSTICHANDLE  )

Clear the HW error status (this function is used by the CrossControl service/daemon to log any hardware errors)

Supported Platform(s): XL, XL5, XM, XM9, XS, XA, VC, VA, VS, VI2, V700, Yukon, V510, V710, V1000, V1200

Returns
error status. 0 = ERR_SUCCESS, otherwise error code. See the enum eErr for details.

◆ Diagnostic_getHardShutDowns()

EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CrossControl::Diagnostic_getHardShutDowns ( DIAGNOSTICHANDLE  ,
uint16_t button,
uint16_t powerloss 
)

Get number of detected hard shutdown events

Supported Platform(s): Yukon, V510, V710, V1000, V1200

Parameters
buttonHard shutdowns by button.
powerlossHard shutdowns by powerloss
Returns
error status. 0 = ERR_SUCCESS, otherwise error code. See the enum eErr for details.

◆ Diagnostic_getHwErrorStatus()

EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CrossControl::Diagnostic_getHwErrorStatus ( DIAGNOSTICHANDLE  ,
uint16_t errorCode 
)

Get hardware error code. If hardware errors are found or other problems are discovered by the SS, they are reported here. See DiagnosticCodes.h for error codes.

Supported Platform(s): XL, XL5, XM, XM9, XS, XA, VC, VA, VS, VI2, V700, Yukon, V510, V710, V1000, V1200

Parameters
errorCodeError code. Zero means no error.
Returns
error status. 0 = ERR_SUCCESS, otherwise error code. See the enum eErr for details.

◆ Diagnostic_getMinMaxTemp()

EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CrossControl::Diagnostic_getMinMaxTemp ( DIAGNOSTICHANDLE  ,
int16_t minTemp,
int16_t maxTemp 
)

Get diagnostic temperature interval of the unit.

Supported Platform(s): XL, XL5, XM, XM9, XS, XA, VC, VA, VS, VI2, V700, Yukon, V510, V710, V1000, V1200

Parameters
minTempMinimum measured PCB temperature.
maxTempMaximum measured PCB temperature.
Returns
error status. 0 = ERR_SUCCESS, otherwise error code. See the enum eErr for details.

Example Usage:

err = Diagnostic_getMinMaxTemp(pDiagnostic, &sValue, &sValue2);
printString(err, "Minimum temp", sValue, "deg C");
printString(err, "Maximum temp", sValue2, "deg C");
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV Diagnostic_getMinMaxTemp(DIAGNOSTICHANDLE, int16_t *minTemp, int16_t *maxTemp)

◆ Diagnostic_getPCBTemp()

EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CrossControl::Diagnostic_getPCBTemp ( DIAGNOSTICHANDLE  ,
int16_t temperature 
)

Get PCB temperature.

Supported Platform(s): XL, XL5, XM, XM9, XS, XA, VC, VA, VS, VI2, V700, Yukon, V510, V710, V1000, V1200

Parameters
temperaturePCB Temperature in degrees Celsius.
Returns
error status. 0 = ERR_SUCCESS, otherwise error code. See the enum eErr for details.

◆ Diagnostic_getPMTemp()

EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CrossControl::Diagnostic_getPMTemp ( DIAGNOSTICHANDLE  ,
uint8_t  index,
int16_t temperature,
JidaSensorType jst 
)

Get Processor Module temperature. This temperature is read from the Kontron JIDA API or Congatec CGOS API. These API's also has a number of other functions, please see the JIDA/CGOS documentation for how to use them separately.

Parameters
indexZero-based index of the temperature sensor. Different boards may have different number of sensors. CCpilot XM and XL currently has 2 sensors, board and cpu. An error is returned if the index is not supported. CCpliot XM 2.0 supports only one sensor, CPU temperature.

Supported Platform(s): XL, XL5, XM, XM9

Parameters
temperatureTemperature in degrees Celsius.
jstThe type of sensor that is being read.
Returns
error status. 0 = ERR_SUCCESS, otherwise error code. See the enum eErr for details.

◆ Diagnostic_getPowerCycles()

EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CrossControl::Diagnostic_getPowerCycles ( DIAGNOSTICHANDLE  ,
uint16_t powerCycles 
)

Get number of power cycles.

Supported Platform(s): XL, XL5, XM, XM9, XS, XA, VC, VA, VS, VI2, V700, Yukon, V510, V710, V1000, V1200

Parameters
powerCyclesTotal number of power cycles.
Returns
error status. 0 = ERR_SUCCESS, otherwise error code. See the enum eErr for details.

◆ Diagnostic_getShutDownReason()

EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CrossControl::Diagnostic_getShutDownReason ( DIAGNOSTICHANDLE  ,
uint16_t reason 
)

Get shutdown reason.

Supported Platform(s): XL, XL5, XM, XM9

Parameters
reasonSee DiagnosticCodes.h for shutdown codes.
Returns
error status. 0 = ERR_SUCCESS, otherwise error code. See the enum eErr for details.

◆ Diagnostic_getSSTemp()

EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CrossControl::Diagnostic_getSSTemp ( DIAGNOSTICHANDLE  ,
int16_t temperature 
)

Get System Supervisor temperature.

Supported Platform(s): XL, XL5, XM, XM9, XS, XA, VC, VA, VS, VI2, V700, Yukon, V510, V710, V1000, V1200

Parameters
temperatureSystem Supervisor temperature in degrees Celsius.
Returns
error status. 0 = ERR_SUCCESS, otherwise error code. See the enum eErr for details.

Example Usage:

err = Diagnostic_getSSTemp(pDiagnostic, &sValue);
printString(err, "Main board (SS) temp", sValue, "deg C");
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV Diagnostic_getSSTemp(DIAGNOSTICHANDLE, int16_t *temperature)

◆ Diagnostic_getStartupReason()

EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CrossControl::Diagnostic_getStartupReason ( DIAGNOSTICHANDLE  ,
uint16_t reason 
)

Get startup reason.

Supported Platform(s): XL, XL5, XM, XM9, XS, XA, VC, VA, VS, VI2, V700, Yukon, V510, V710, V1000, V1200

Parameters
reasonSee DiagnosticCodes.h for startup codes.
Returns
error status. 0 = ERR_SUCCESS, otherwise error code. See the enum eErr for details.

◆ Diagnostic_getTimer()

EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CrossControl::Diagnostic_getTimer ( DIAGNOSTICHANDLE  ,
TimerType times 
)

Get diagnostic timer.

Supported Platform(s): XL, XL5, XM, XM9, XS, XA, VC, VA, VS, VI2, V700, Yukon, V510, V710, V1000, V1200

Parameters
timesGet a struct with the current diagnostic times.
Returns
error status. 0 = ERR_SUCCESS, otherwise error code. See the enum eErr for details.

Example Usage:

err = Diagnostic_getTimer(pDiagnostic, &tt);
printStringTime(err, "Total run time", tt.TotRunTime);
printStringTime(err, "Total suspend time", tt.TotSuspTime);
printStringTime(err, "Total heat time", tt.TotHeatTime);
printStringTime(err, "Total run time 40-60 deg C", tt.RunTime40_60);
printStringTime(err, "Total run time 60-70 deg C", tt.RunTime60_70);
printStringTime(err, "Total run time 70-80 deg C", tt.RunTime70_80);
printStringTime(err, "Total run time above 80 deg C", tt.Above80RunTime);
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV Diagnostic_getTimer(DIAGNOSTICHANDLE, TimerType *times)

◆ Diagnostic_getTimerExt()

EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV CrossControl::Diagnostic_getTimerExt ( DIAGNOSTICHANDLE  ,
TimerTypeExt times 
)

Get extended diagnostic timer.

Supported Platform(s): Yukon, V510, V710, V1000, V1200

Parameters
timesGet a struct with the current diagnostic times.
Returns
error status. 0 = ERR_SUCCESS, otherwise error code. See the enum eErr for details.

Example Usage:

err = Diagnostic_getTimerExt(pDiagnostic, &tt_ext);
printStringTime(err, "Total run time", tt_ext.TotRunTime);
printStringTime(err, "Total suspend time", tt_ext.TotSuspTime);
printStringTime(err, "Total heat time", tt_ext.TotHeatTime);
printStringTime(err, "Total run time 40-60 deg C", tt_ext.RunTime40_60);
printStringTime(err, "Total run time 60-70 deg C", tt_ext.RunTime60_70);
printStringTime(err, "Total run time 70-80 deg C", tt_ext.RunTime70_80);
printStringTime(err, "Total run time 80-90 deg C", tt_ext.RunTime80_90);
printStringTime(err, "Total run time 90-100 deg C", tt_ext.RunTime90_100);
printStringTime(err, "Total run time above 100 deg C", tt_ext.Above100RunTime);
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV Diagnostic_getTimerExt(DIAGNOSTICHANDLE, TimerTypeExt *times)

◆ Diagnostic_release()

EXTERN_C CCAUXDLL_API void CCAUXDLL_CALLING_CONV CrossControl::Diagnostic_release ( DIAGNOSTICHANDLE  )

Delete the Diagnostic object.

Supported Platform(s): XL, XL5, XM, XM9, XS, XA, VC, VA, VS, VI2, V700, Yukon, V510, V710, V1000, V1200

Returns
-

Example Usage:

assert(pDiagnostic);
diagnostic_example(pDiagnostic);
Diagnostic_release(pDiagnostic);
EXTERN_C CCAUXDLL_API void CCAUXDLL_CALLING_CONV Diagnostic_release(DIAGNOSTICHANDLE)
EXTERN_C CCAUXDLL_API DIAGNOSTICHANDLE CCAUXDLL_CALLING_CONV GetDiagnostic(void)
void * DIAGNOSTICHANDLE
Definition: Diagnostic.h:35

◆ GetDiagnostic()

EXTERN_C CCAUXDLL_API DIAGNOSTICHANDLE CCAUXDLL_CALLING_CONV CrossControl::GetDiagnostic ( void  )

Factory function that creates instances of the Diagnostic object.

Supported Platform(s): XL, XL5, XM, XM9, XS, XA, VC, VA, VS, VI2, V700, Yukon, V510, V710, V1000, V1200

Returns
DIAGNOSTICHANDLE to an allocated Diagnostic object. The returned handle needs to be deallocated using the Diagnostic_release(DIAGNOSTICHANDLE) method when it's no longer needed. Returns NULL if it fails to allocate memory.

Example Usage:

assert(pDiagnostic);
diagnostic_example(pDiagnostic);
Diagnostic_release(pDiagnostic);