Kangaroo Library for Arduino
Use reliable Packet Serial to communicate with your Kangaroo.
Public Member Functions | List of all members
KangarooStatus Class Reference

Stores the response to a status request. More...

Public Member Functions

char channel () const
 
KangarooStatusFlags flags () const
 
KangarooGetType type () const
 
int32_t value () const
 
boolean busy () const
 
KangarooError error () const
 
boolean done () const
 
boolean ok () const
 
boolean timedOut () const
 

Detailed Description

Stores the response to a status request.

Returned by KangarooChannel::getP(), KangarooMonitor::status(), and others.

Member Function Documentation

boolean KangarooStatus::busy ( ) const
inline

Gets whether a recently-requested command is still executing. For example, KangarooChannel::p() is busy while the channel is getting into position, and KangarooChannel::home() is busy while the channel is homing.

Returns
True if the channel is busy.
char KangarooStatus::channel ( ) const
inline

Gets the channel name.

Returns
The channel name.
boolean KangarooStatus::done ( ) const
inline

Gets whether a recently-requested command has completed execution. For example, KangarooChannel::p() is done when the channel is in position.

Returns
True if the command is done.
KangarooError KangarooStatus::error ( ) const
inline

If the response is an error, gets the error.

Returns
The error, or KANGAROO_NO_ERROR if the response is not an error.
KangarooStatusFlags KangarooStatus::flags ( ) const
inline

Gets the status flags associated with this response.

Returns
The status flags.
boolean KangarooStatus::ok ( ) const
inline

Gets whether the response is not an error and KangarooStatus::value() is the requested value.

Returns
True if the response is not an error.
boolean KangarooStatus::timedOut ( ) const
inline

Gets whether a timeout has occurred.

Returns
True if the KangarooStatus::error() equals KANGARO_TIMED_OUT.
KangarooGetType KangarooStatus::type ( ) const
inline

Gets the type of the request.

Returns
The type of the request.
int32_t KangarooStatus::value ( ) const
inline

Gets the value associated with this response.

Returns
The value.