AFBR-S50 API Reference Manual v1.5.6
AFBR-S50 Time-of-Flight Sensor SDK for Embedded Software
Loading...
Searching...
No Matches

Generic Command Definitions. More...

Collaboration diagram for SCI: Generic Command Definitions:

Macros

#define SCI_LOG_TIMESTAMP   1
 

Enumerations

enum  GenericSerialCommandCodes {
  CMD_INVALID = 0x00 ,
  CMD_PING = 0x01 ,
  CMD_LOG_MESSAGE = 0x06 ,
  CMD_STATUS_REPORT = 0x07 ,
  CMD_SYSTEM_RESET = 0x08 ,
  CMD_ACKNOWLEDGE = 0x0A ,
  CMD_NOT_ACKNOWLEDGE = 0x0B ,
  CMD_TEST_MESSAGE = 0x04
}
 

Functions

status_t SCI_SendStatusReport (sci_device_t deviceID, status_t status)
 Sends an status report.
 
status_t SCI_SendLogEntry (const char *fmt_s,...)
 Sends a log message.
 
status_t SCI_Printf (const char *fmt_s,...)
 Sends a log message.
 

Detailed Description

Generic Command Definitions.


Generic command definitions for the systems communication interface.

Macro Definition Documentation

◆ SCI_LOG_TIMESTAMP

#define SCI_LOG_TIMESTAMP   1

Determines whether to include a time stamp into log messages.

Enumeration Type Documentation

◆ GenericSerialCommandCodes

Generic commands for the SCI module.

Enumerator
CMD_INVALID 

Program internal marker for invalid/erroneous commands.

CMD_PING 
CMD_LOG_MESSAGE 

Simple ping message that will just acknowledge if successfully received. An event/debug log message.

CMD_STATUS_REPORT 

Software status/error report (running, pause, error, ...) from MCU or request from PC.

CMD_SYSTEM_RESET 

Command to reset the MCU.

CMD_ACKNOWLEDGE 

Acknowledge of the previous command.

CMD_NOT_ACKNOWLEDGE 

Not-acknowledge of the previous command.

CMD_TEST_MESSAGE 

Test message send to the slave. The slave will reflect the message back to the master.

Function Documentation

◆ SCI_Printf()

status_t SCI_Printf ( const char *  fmt_s,
  ... 
)

Sends a log message.


Parameters
fmt_sThe printf() format string.
...The printf() arguments.
Returns
Returns the status (STATUS_OK on success).

◆ SCI_SendLogEntry()

status_t SCI_SendLogEntry ( const char *  fmt_s,
  ... 
)

Sends a log message.


Parameters
fmt_sThe printf() format string.
...The printf() arguments.
Returns
Returns the status (STATUS_OK on success).

◆ SCI_SendStatusReport()

status_t SCI_SendStatusReport ( sci_device_t  deviceID,
status_t  status 
)

Sends an status report.


Parameters
deviceIDThe slave ID of the sensor handler to process the command.
statusThe status value to be reported.
Returns
Returns the status (STATUS_OK on success).