Arun Raj / Mbed OS MAXREFDES101_SOURCE

Dependencies:   max32630fthr Adafruit_FeatherOLED USBDevice

Embed: (wiki syntax)

« Back to documentation index

DSInterface Class Reference

DSInterface Class Reference

DSInterface is Maxim's DeviceStudio Interface class. More...

#include <DSInterface.h>

Public Member Functions

 DSInterface (USBSerial *USB)
 DSInterface constructor.
virtual ~DSInterface ()
 DSInterface destructor.
void add_sensor_comm (SensorComm *s)
 Add SensorComm for DSInterface to pass commands to.
void build_command (char ch)
 Command builder from i/o device.
void data_report_execute ()
 Prints latest sensor data to USB stream.
void set_fw_version (const char *fw_version)
 Set the fw version which DSInterface will replay with for "get_device_info" command.
int get_fw_algorithms (void)
 get the algorithms define within sesnor hub fw version
void set_fw_platform (const char *fw_platform)
 Set the fw platform which DSInterface will replay with for "get_device_info" command.
void enable_console_interface ()
 Enable data output on the console interface (USB)

Protected Member Functions

void parse_command ()
 Parses DeviceStudio commands.

Detailed Description

DSInterface is Maxim's DeviceStudio Interface class.

Definition at line 67 of file DSInterface.h.


Constructor & Destructor Documentation

DSInterface ( USBSerial *  USB )

DSInterface constructor.

Parameters:
[in]fw_versionFirmware version number.
[in]fw_platformFirmware platform name.
[in]USBPointer to USBSerial device

Definition at line 121 of file DSInterface.cpp.

~DSInterface (  ) [virtual]

DSInterface destructor.

Definition at line 143 of file DSInterface.cpp.


Member Function Documentation

void add_sensor_comm ( SensorComm s )

Add SensorComm for DSInterface to pass commands to.

Parameters:
[in]sSensorComm instance to handle sensor commands.

Definition at line 147 of file DSInterface.cpp.

void build_command ( char  ch )

Command builder from i/o device.

Reads character and builds command from DeviceStudio commands.

Parameters:
[in]chInput character from i/o device.

Definition at line 177 of file DSInterface.cpp.

void data_report_execute (  )

Prints latest sensor data to USB stream.

Should be called on every pass thorugh the main loop in main.cpp

Definition at line 595 of file DSInterface.cpp.

void enable_console_interface (  )

Enable data output on the console interface (USB)

Definition at line 153 of file DSInterface.cpp.

int get_fw_algorithms ( void   )

get the algorithms define within sesnor hub fw version

Parameters:
[out]algorihmdescription string

Definition at line 663 of file DSInterface.cpp.

void parse_command (  ) [protected]

Parses DeviceStudio commands.

Parses and executes commands. Prints return code to i/o device.

Definition at line 232 of file DSInterface.cpp.

void set_fw_platform ( const char *  fw_platform )

Set the fw platform which DSInterface will replay with for "get_device_info" command.

Parameters:
[in]fw_platformFirmware platform name.

Definition at line 715 of file DSInterface.cpp.

void set_fw_version ( const char *  fw_version )

Set the fw version which DSInterface will replay with for "get_device_info" command.

Parameters:
[in]fw_versionFirmware version number.

Definition at line 655 of file DSInterface.cpp.