TCode Library
A library to aid in decoding/using of Toy Code ("T-Code") data.
Loading...
Searching...
No Matches
TCodeAxis Class Reference

Class used to represent a TCode Axis. More...

#include <TCodeAxis.h>

Public Member Functions

 TCodeAxis (const char *name, TCode_ChannelID channel)
 constructor for the TCodeAxis class
 
void set (int targetValue, TCode_Axis_Extention_Type extentionType=TCode_Axis_Extention_Type::Time, long extentionValue=0, TCode_Axis_Ramp_Type rampType=TCode_Axis_Ramp_Type::Linear)
 sets the axis' dynamic parameters
 
int getPosition ()
 gets the current position of the axis
 
void stop ()
 stops axis movement at its current position
 
bool changed ()
 stops axis movement at its current position
 
const char * getName ()
 gets the name of the axis
 
TCode_ChannelID getChannelID ()
 gets channel ID of the axis
 

Detailed Description

Class used to represent a TCode Axis.

Definition at line 41 of file TCodeAxis.h.

Constructor & Destructor Documentation

◆ TCodeAxis()

TCodeAxis::TCodeAxis ( const char *  name,
TCode_ChannelID  channel 
)

constructor for the TCodeAxis class

Parameters
nameconstant char string name for the axis
channelchannel ID for this axis

Definition at line 6 of file TCodeAxis.cpp.

Member Function Documentation

◆ changed()

bool TCodeAxis::changed ( )

stops axis movement at its current position

Returns
returns true if the axis has changed position since last check

Definition at line 191 of file TCodeAxis.cpp.

◆ getChannelID()

TCode_ChannelID TCodeAxis::getChannelID ( )

gets channel ID of the axis

Returns
returns the channel ID of the axis

Definition at line 206 of file TCodeAxis.cpp.

◆ getName()

const char * TCodeAxis::getName ( )

gets the name of the axis

Returns
returns the c_string representation of the name stored

Definition at line 201 of file TCodeAxis.cpp.

◆ getPosition()

int TCodeAxis::getPosition ( )

gets the current position of the axis

Returns
current position of this axis as an int

Definition at line 106 of file TCodeAxis.cpp.

◆ set()

void TCodeAxis::set ( int  targetValue,
TCode_Axis_Extention_Type  extentionType = TCode_Axis_Extention_Type::Time,
long  extentionValue = 0,
TCode_Axis_Ramp_Type  rampType = TCode_Axis_Ramp_Type::Linear 
)

sets the axis' dynamic parameters

Parameters
target_valuethe target value for this axis
extentionTypethe extention type for the axis e.g. Time,Speed
extentionValuethe extention value
rampTypethe ramp type

Definition at line 47 of file TCodeAxis.cpp.

◆ stop()

void TCodeAxis::stop ( )

stops axis movement at its current position

Definition at line 174 of file TCodeAxis.cpp.


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