Instrument Neutral Distributed Interface INDI 2.2.5
AUXCommand Class Reference

#include <celestron_dewpower_auxproto.h>

Public Member Functions

 AUXCommand ()
 AUXCommand (const AUXBuffer &buf)
 AUXCommand (AUXCommands command, AUXTargets source, AUXTargets destination, const AUXBuffer &data)
 AUXCommand (AUXCommands command, AUXTargets source, AUXTargets destination)
void fillBuf (AUXBuffer &buf)
 Buffer Management.
void parseBuf (AUXBuffer buf)
void parseBuf (AUXBuffer buf, bool do_checksum)
const AUXTargets & source () const
 Getters.
const AUXTargets & destination () const
const AUXBuffer & data () const
AUXCommands command () const
size_t dataSize () const
const char * commandName () const
uint32_t getData ()
 Set and Get data.
void setData (uint32_t value, uint8_t bytes=3)
 Set encoder position in steps.
void setDataBuffer (const AUXBuffer &data)
const AUXBuffer & getDataBuffer () const
bool isValid () const
uint8_t checksum (AUXBuffer buf)
 Check sum.
const char * commandName (AUXCommands command) const
 Logging.
const char * moduleName (AUXTargets n)
int responseDataSize ()
void logResponse ()
void logCommand ()

Static Public Member Functions

static void setDebugInfo (const char *deviceName, uint8_t debugLevel)

Static Public Attributes

static uint8_t DEBUG_LEVEL = 0
static char DEVICE_NAME [64] = {0}

Detailed Description

Definition at line 84 of file celestron_dewpower_auxproto.h.

Constructor & Destructor Documentation

◆ AUXCommand() [1/4]

AUXCommand::AUXCommand ( )

Definition at line 142 of file celestron_dewpower_auxproto.cpp.

◆ AUXCommand() [2/4]

AUXCommand::AUXCommand ( const AUXBuffer & buf)

Definition at line 150 of file celestron_dewpower_auxproto.cpp.

◆ AUXCommand() [3/4]

AUXCommand::AUXCommand ( AUXCommands command,
AUXTargets source,
AUXTargets destination,
const AUXBuffer & data )

Definition at line 159 of file celestron_dewpower_auxproto.cpp.

◆ AUXCommand() [4/4]

AUXCommand::AUXCommand ( AUXCommands command,
AUXTargets source,
AUXTargets destination )

Definition at line 172 of file celestron_dewpower_auxproto.cpp.

Member Function Documentation

◆ checksum()

unsigned char AUXCommand::checksum ( AUXBuffer buf)

Check sum.

Definition at line 361 of file celestron_dewpower_auxproto.cpp.

◆ command()

AUXCommands AUXCommand::command ( ) const
inline

Definition at line 114 of file celestron_dewpower_auxproto.h.

◆ commandName() [1/2]

const char * AUXCommand::commandName ( ) const
inline

Definition at line 122 of file celestron_dewpower_auxproto.h.

◆ commandName() [2/2]

const char * AUXCommand::commandName ( AUXCommands command) const

Logging.

Definition at line 184 of file celestron_dewpower_auxproto.cpp.

◆ data()

const AUXBuffer & AUXCommand::data ( ) const
inline

Definition at line 110 of file celestron_dewpower_auxproto.h.

◆ dataSize()

size_t AUXCommand::dataSize ( ) const
inline

Definition at line 118 of file celestron_dewpower_auxproto.h.

◆ destination()

const AUXTargets & AUXCommand::destination ( ) const
inline

Definition at line 106 of file celestron_dewpower_auxproto.h.

◆ fillBuf()

void AUXCommand::fillBuf ( AUXBuffer & buf)

Buffer Management.

Definition at line 310 of file celestron_dewpower_auxproto.cpp.

◆ getData()

uint32_t AUXCommand::getData ( )

Set and Get data.

Return 8, 16, or 24bit value as dictacted by the data response size.

getData Parses data packet and convert it to a 32bit unsigned integer

Parameters
bytesHow many bytes to interpret the data.
Returns

Definition at line 375 of file celestron_dewpower_auxproto.cpp.

◆ getDataBuffer()

const AUXBuffer & AUXCommand::getDataBuffer ( ) const
inline

Definition at line 138 of file celestron_dewpower_auxproto.h.

◆ isValid()

bool AUXCommand::isValid ( ) const
inline

Definition at line 139 of file celestron_dewpower_auxproto.h.

◆ logCommand()

void AUXCommand::logCommand ( )

Definition at line 96 of file celestron_dewpower_auxproto.cpp.

◆ logResponse()

void AUXCommand::logResponse ( )

Definition at line 59 of file celestron_dewpower_auxproto.cpp.

◆ moduleName()

const char * AUXCommand::moduleName ( AUXTargets n)

Definition at line 292 of file celestron_dewpower_auxproto.cpp.

◆ parseBuf() [1/2]

void AUXCommand::parseBuf ( AUXBuffer buf)

Definition at line 329 of file celestron_dewpower_auxproto.cpp.

◆ parseBuf() [2/2]

void AUXCommand::parseBuf ( AUXBuffer buf,
bool do_checksum )

Definition at line 346 of file celestron_dewpower_auxproto.cpp.

◆ responseDataSize()

int AUXCommand::responseDataSize ( )

Definition at line 240 of file celestron_dewpower_auxproto.cpp.

◆ setData()

void AUXCommand::setData ( uint32_t value,
uint8_t bytes = 3 )

Set encoder position in steps.

Definition at line 399 of file celestron_dewpower_auxproto.cpp.

◆ setDataBuffer()

void AUXCommand::setDataBuffer ( const AUXBuffer & data)
inline

Definition at line 137 of file celestron_dewpower_auxproto.h.

◆ setDebugInfo()

void AUXCommand::setDebugInfo ( const char * deviceName,
uint8_t debugLevel )
static

Definition at line 133 of file celestron_dewpower_auxproto.cpp.

◆ source()

const AUXTargets & AUXCommand::source ( ) const
inline

Getters.

Definition at line 102 of file celestron_dewpower_auxproto.h.

Member Data Documentation

◆ DEBUG_LEVEL

uint8_t AUXCommand::DEBUG_LEVEL = 0
static

Definition at line 157 of file celestron_dewpower_auxproto.h.

◆ DEVICE_NAME

char AUXCommand::DEVICE_NAME = {0}
static

Definition at line 36 of file celestron_dewpower_auxproto.h.


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