Wombat Environmental Node 1.0
An environmental node for SDI-12 and digital sensors.
Loading...
Searching...
No Matches
CLICatM1 Class Reference

CLI for CAT-M1 commands. More...

#include <cat-m1.h>

Collaboration diagram for CLICatM1:

Static Public Member Functions

static BaseType_t enter_cli (char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString)
 Command line interface handler for a Cat M1 device. More...
 

Static Public Attributes

static const std::string cmd = "c1"
 CLI CAT-M1 reference, to send commands use "c1" followed by the command. More...
 

Detailed Description

CLI for CAT-M1 commands.

Features a pass through mode where commands are sent directly to the modem. Several other commands are inbuilt to allow for communications to and from the modem without typing several AT-commands.

Member Function Documentation

◆ enter_cli()

BaseType_t CLICatM1::enter_cli ( char *  pcWriteBuffer,
size_t  xWriteBufferLen,
const char *  pcCommandString 
)
static

Command line interface handler for a Cat M1 device.

This function is a command line interface (CLI) handler for a Cat M1 device. It processes commands entered by the user and takes the following actions:

  • pt: Enter Cat M1 passthrough mode. In this mode, all input from the user is forwarded to the Cat M1 device and all output from the Cat M1 device is displayed to the user. The mode is exited by pressing ctrl-D.
  • pwr: Set the power state of the Cat M1 device, 1 on, 0 off.
  • on: Turn the Cat M1 device on.
  • off: Turn the Cat M1 device off.
  • restart: Restart the Cat M1 device.
  • factory: Reset the Cat M1 device to factory settings.
  • echo: Enable or disable command echo.
  • cme: Enable or disable the +CME error code feature.
Parameters
pcWriteBufferA buffer where the function can write a response string to be displayed to the user.
xWriteBufferLenThe length of the pcWriteBuffer buffer.
pcCommandStringA string containing the command entered by the user.
Returns
pdFALSE if there are no more responses to be displayed, or pdTRUE if there are more responses to be displayed in subsequent calls to this function.

Member Data Documentation

◆ cmd

const std::string CLICatM1::cmd = "c1"
inlinestatic

CLI CAT-M1 reference, to send commands use "c1" followed by the command.


The documentation for this class was generated from the following files: