CANopen Master Documentation
Version 6.06.04
Loading...
Searching...
No Matches
com_demo_app.h File Reference

Detailed Description

This file implements generic demo functions for a CANopen Master application, used by the Demo application.

+ Include dependency graph for com_demo_app.h:

Functions

void ComDemoAppConsoleError (const char *szMessageV, ComStatus_tv tvStatusV)
 
void ComDemoAppConsoleLog (const char *szMessageV)
 
ComStatus_tv ComDemoAppInit (uint8_t ubNetV)
 
ComStatus_tv ComDemoAppInitServices (uint8_t ubNetV)
 
ComStatus_tv ComDemoAppInitTarget (uint8_t ubCanIfV, uint8_t ubNetV, ComDemoAppOptions_ts *ptsOptionsV)
 
void ComDemoAppProcess (uint8_t ubNetV)
 
void ComDemoAppTimerEvent (void)
 

Function Documentation

◆ ComDemoAppConsoleError()

void ComDemoAppConsoleError ( const char *  szMessageV,
ComStatus_tv  tvStatusV 
)
Parameters
[in]szMessageVMessage string
[in]tvStatusVCANopen stack status value
Note
This function is target specific

This function prints the message szMessageV and the CANopen stack status code tvStatusV to the console.

◆ ComDemoAppConsoleLog()

void ComDemoAppConsoleLog ( const char *  szMessageV)
Parameters
[in]szMessageVMessage string
Note
This function is target specific

This function prints the message szMessageV to the console or a logging system.

◆ ComDemoAppInit()

ComStatus_tv ComDemoAppInit ( uint8_t  ubNetV)
Parameters
[in]ubNetVCANopen Network channel
Returns
Value of enumeration ComErr_e

This function is called inside the example main() routine after the CANopen FD Master protocol stack has been initialised. The function calls ComDemoAppInitTarget() and ComDemoAppInitServices() for an individual initialisation of target examples (refer to Examples for evaluation boards).

◆ ComDemoAppInitServices()

ComStatus_tv ComDemoAppInitServices ( uint8_t  ubNetV)
Parameters
[in]ubNetVCANopen Network channel
Returns
Value of enumeration ComErr_e
Note
This function is target specific, sample implementations are located inside the /source/application/examples-com/boards/ directories.

This function is called inside the ComDemoAppInit() routine. The function performs an individual CANopen service initialisation of the target examples.

◆ ComDemoAppInitTarget()

ComStatus_tv ComDemoAppInitTarget ( uint8_t  ubCanIfV,
uint8_t  ubNetV,
ComDemoAppOptions_ts *  ptsOptionsV 
)
Parameters
[in]ubCanIfVPhysical CAN interface
[in]ubNetVCANopen Network channel
[in]ptsOptionsVConfiguration options
Returns
Value of enumeration ComErr_e
Note
This function is target specific, sample implementations are located inside the /source/application/examples-com/boards/ directories.

This function is called inside the ComDemoAppInit() routine. The function performs an individual hardware initialisation of the target examples.

◆ ComDemoAppProcess()

void ComDemoAppProcess ( uint8_t  ubNetV)
Parameters
[in]ubNetV- CANopen Network channel

This function is called inside the main loop of the demo application. The functionality is individual for each target inside the examples-com directory.

◆ ComDemoAppTimerEvent()

void ComDemoAppTimerEvent ( void  )

This function is called periodically with a 10 ms timer base inside the demo application. The functionality is individual for each target inside the examples-com directory.