CANopen Master Documentation
Version 6.08.00
|
This file implements service demo functions for a CANopen Master application.
#include "com_mgr.h"
#include "com_nmt.h"
#include "com_lss.h"
#include "com_sync.h"
#include "com_time.h"
#include <stdio.h>
#include <string.h>
Functions | |
ComStatus_tv | ComDemoLssProcess (uint8_t ubNetV) |
ComStatus_tv | ComDemoNmtProcess (uint8_t ubNetV) |
#define TMPL_COM_HAS_CONSOLE 0 |
ComStatus_tv ComDemoLssProcess | ( | uint8_t | ubNetV | ) |
[in] | ubNetV | CANopen Network channel |
This sample code shows the interaction between the event handler for LSS and an example LSS master process behaviour. The LSS master process should be called periodically (e.g. every 200 ms). The LSS master process performs the following steps:
uint8_t ComDemoLssState | ( | uint8_t | ubNetV | ) |
void ComDemoNmtConfigurationDone | ( | uint8_t | ubNetV, |
uint8_t | ubNodeIdV ) |
ComStatus_tv ComDemoNmtInit | ( | uint8_t | ubNetV | ) |
ComStatus_tv ComDemoNmtProcess | ( | uint8_t | ubNetV | ) |
[in] | ubNetV | CANopen Network channel |
This sample code shows possible reaction on a NMT state change of a CANopen device.
void ComDemoNmtQueueStateChange | ( | uint8_t | ubNetV, |
uint8_t | ubNodeIdV, | ||
uint8_t | ubNmtStateV ) |
char * ComDemoNmtStateString | ( | uint8_t | ubNetV, |
uint8_t | ubNodeIdV ) |
ComStatus_tv ComDemoNodeIdentify | ( | uint8_t | ubNetV, |
uint8_t | ubNodeIdV ) |
char * ComDemoNodeInfoString | ( | uint8_t | ubNetV, |
uint8_t | ubNodeIdV ) |
ComStatus_tv ComDemoNodeInit | ( | uint8_t | ubNetV | ) |
char * ComDemoNrlStateString | ( | uint8_t | ubNetV | ) |
ComStatus_tv ComDemoPdoRcvInit | ( | uint8_t | ubNetV | ) |
ComStatus_tv ComDemoPdoTrmInit | ( | uint8_t | ubNetV | ) |
ComStatus_tv ComDemoSdoObjectRead | ( | uint8_t | ubNetV, |
uint8_t | ubNodeIdV ) |
ComStatus_tv ComDemoSyncCounter | ( | uint8_t | ubNetV | ) |
ComStatus_tv ComDemoSyncStart | ( | uint8_t | ubNetV | ) |