API
 
Loading...
Searching...
No Matches
MagAOX::app::zaberBinaryStage< parentT > Class Template Reference

A class to manage the details of one binary-protocol stage in a Zaber system. More...

#include <zaberBinaryStage.hpp>

Collaboration diagram for MagAOX::app::zaberBinaryStage< parentT >:
Collaboration graph

Public Types

enum  commandCodes : uint8_t {
  cmdHome = 1 , cmdRenumber = 2 , cmdStoreCurrentPosition = 16 , cmdReturnStoredPosition = 17 ,
  cmdMoveToStoredPosition = 18 , cmdMoveAbsolute = 20 , cmdMoveRelative = 21 , cmdStop = 23 ,
  cmdSetHoldCurrent = 39 , cmdSetDeviceMode = 40 , cmdSetTargetSpeed = 42 , cmdSetMaximumPosition = 44 ,
  cmdSetCurrentPosition = 45 , cmdReturnFirmwareVersion = 51 , cmdReturnSetting = 53 , cmdReturnStatus = 54 ,
  cmdReturnCurrentPosition = 60 , cmdReturnSerialNumber = 63
}
 Binary protocol command numbers used by the T-LSM firmware 5.xx implementation. More...
 
enum  modeBits : int32_t { modeDisableAutoReply = ( 1 << 0 ) , modeDisablePotentiometer = ( 1 << 3 ) , modeHomeStatus = ( 1 << 7 ) }
 Device-mode bits used by the implementation. More...
 

Public Member Functions

 zaberBinaryStage ()=delete
 Default constructor deleted because stages require a parent app.
 
 zaberBinaryStage (parentT *parent)
 Construct the stage helper.
 
std::string name ()
 Get the stage name.
 
int name (const std::string &n)
 Set the stage name.
 
std::string serial ()
 Get the stage serial number.
 
int serial (const std::string &s)
 Set the stage serial number.
 
int deviceAddress ()
 Get the device address.
 
int deviceAddress (const int &da)
 Set the device address.
 
int axisNumber ()
 Get the axis number.
 
int axisNumber (const int &an)
 Set the axis number.
 
bool commandStatus ()
 Get the status of the last command.
 
char deviceStatus ()
 Get the current device status.
 
bool homing ()
 Get the homing state.
 
time_t lastHomed ()
 Get the last home time.
 
int parked ()
 Get the parked state.
 
bool knobEnabled ()
 Get the knob state.
 
long rawPos ()
 Get the current raw position.
 
long tgtPos ()
 Get the target raw position.
 
long maxPos ()
 Get the maximum position.
 
int32_t targetSpeed ()
 Get the configured target speed.
 
int targetSpeed (const int32_t &speed)
 Set the configured target speed.
 
bool warn ()
 Get whether any warning-equivalent flag is set.
 
float temp ()
 Get the driver temperature.
 
bool warningState ()
 Get whether any warning-equivalent flag is set.
 
bool warnFD ()
 Get the driver-disabled warning flag.
 
bool warnFQ ()
 Get the FQ warning flag.
 
bool warnFS ()
 Get the FS warning flag.
 
bool warnFT ()
 Get the FT warning flag.
 
bool warnFB ()
 Get the FB warning flag.
 
bool warnFP ()
 Get the FP warning flag.
 
bool warnFE ()
 Get the FE warning flag.
 
bool warnWH ()
 Get the WH warning flag.
 
bool warnWL ()
 Get the WL warning flag.
 
bool warnWP ()
 Get the WP warning flag.
 
bool warnWV ()
 Get the WV warning flag.
 
bool warnWT ()
 Get the WT warning flag.
 
bool warnWM ()
 Get the WM warning flag.
 
bool warnWR ()
 Get the WR warning flag.
 
bool warnNC ()
 Get the NC warning flag.
 
bool warnNI ()
 Get the NI warning flag.
 
bool warnND ()
 Get the ND warning flag.
 
bool warnNU ()
 Get the NU warning flag.
 
bool warnNJ ()
 Get the NJ warning flag.
 
bool warnUNK ()
 Get the unknown-warning flag.
 
int queryCommand (int32_t &response, z_port port, uint8_t commandNumber, int32_t data, uint8_t expectedReply)
 Send a command and wait for the corresponding binary reply.
 
int sendCommandNoReply (z_port port, uint8_t commandNumber, int32_t data)
 Send a command for which no reply is expected.
 
int getSetting (int32_t &value, z_port port, uint8_t settingNumber)
 Return a setting value from the device.
 
int getMaxPos (z_port port)
 Get the maximum position from the device.
 
int getParked (z_port port)
 Get the parked state for MagAO-X compatibility.
 
int getKnob (z_port port)
 Get the knob enabled status.
 
int updatePos (z_port port)
 Update the current position and derived motion state.
 
int updateTemp (z_port port)
 Update the stage temperature, if supported.
 
int enableKnob (z_port port, bool enable)
 Disable the manual knob and asynchronous command replies.
 
int setTargetSpeed (z_port port, int32_t speed)
 Set the target speed used for absolute and relative moves.
 
int setHoldCurrent (z_port port, int32_t value)
 Set the hold current used while the stage is idle.
 
int stop (z_port port)
 Stop the stage.
 
int estop (z_port port)
 Emergency-stop the stage.
 
int home (z_port port)
 Home the stage.
 
int park (z_port port)
 Mark the stage parked using MagAO-X bookkeeping semantics.
 
int unpark (z_port port)
 Clear the parked bookkeeping state.
 
int recallParkPosition (z_port port)
 Recall the MagAO-X parked position from device non-volatile memory.
 
int restoreParkedState (z_port port)
 Restore parked state after a power cycle if device and disk state agree.
 
int moveAbs (z_port port, long rawPos)
 Move to a new absolute position.
 
int unsetWarnings ()
 Clear all warning flags.
 
int getWarnings (z_port port)
 Refresh warning-equivalent state from firmware 5.xx information.
 
int updateLastHomed (bool wasHoming)
 Refresh the stored last-home timestamp when a home completion is detected.
 
int onPowerOff ()
 Clear transient state on power-off.
 
int writeStateFile (std::ofstream &fout)
 Write the state file used by the low-level app.
 
int readStateFile (std::ifstream &fin)
 Read the state file used by the low-level app.
 

Static Public Attributes

static constexpr int32_t parkPositionRegister = 0
 Stored-position register used to persist the MagAO-X parked position.
 

Protected Attributes

parentT * m_parent { nullptr }
 Parent application used for logging and power-state checks.
 
std::string m_name
 Configured stage name used in INDI properties.
 
std::string m_serial
 Configured stage serial number.
 
int m_deviceAddress { -1 }
 Current binary device address.
 
int m_axisNumber { 0 }
 Axis number placeholder for future multi-axis support.
 
bool m_commandStatus { true }
 Whether the most recent command was accepted.
 
char m_deviceStatus { 'U' }
 Current device state mapped to ASCII-app semantics.
 
bool m_homing { false }
 Whether the stage is currently homing.
 
timespec m_lastHomed { 0, 0 }
 Time stamp of the last successful home operation.
 
bool m_parked { false }
 Whether MagAO-X currently considers this stage parked.
 
long m_rawPos { 0 }
 Current raw position in microsteps.
 
long m_tgtPos { 0 }
 Last target position sent to the device in microsteps.
 
int32_t m_targetSpeed { 1000 }
 Configured target speed command value for this stage.
 
long m_maxPos { -1 }
 Maximum position in microsteps.
 
long m_parkPos { 0 }
 Emulated parked position in microsteps.
 
bool m_hasParkPos { false }
 Whether a parked position has been recovered from device non-volatile memory.
 
bool m_hasStateFile { false }
 Whether a parked state file has been loaded from disk.
 
long m_stateFileRawPos { 0 }
 Raw position loaded from the parked state file.
 
bool m_stateFileParked { false }
 Parked flag loaded from the parked state file.
 
float m_temp { -999.0 }
 Last reported stage temperature. Firmware 5.35 does not expose this directly.
 
bool m_knobEnabled { false }
 whether potentiometer knob is enabled
 
bool m_warn { false }
 Whether any warning-equivalent condition is active.
 
bool m_warnFD { false }
 Driver disabled warning flag.
 
bool m_warnFQ { false }
 Device-specific warning flag placeholders retained for API compatibility.
 
bool m_warnFS { false }
 
bool m_warnFT { false }
 
bool m_warnFB { false }
 
bool m_warnFP { false }
 
bool m_warnFE { false }
 
bool m_warnWH { false }
 
bool m_warnWL { false }
 
bool m_warnWP { false }
 
bool m_warnWV { false }
 
bool m_warnWT { false }
 
bool m_warnWM { false }
 
bool m_warnWR { false }
 
bool m_warnNC { false }
 
bool m_warnNI { false }
 
bool m_warnND { false }
 
bool m_warnNU { false }
 
bool m_warnNJ { false }
 
bool m_warnUNK { false }
 

Detailed Description

template<class parentT>
class MagAOX::app::zaberBinaryStage< parentT >

A class to manage the details of one binary-protocol stage in a Zaber system.

Definition at line 30 of file zaberBinaryStage.hpp.

Member Enumeration Documentation

◆ commandCodes

template<class parentT >
enum MagAOX::app::zaberBinaryStage::commandCodes : uint8_t

Binary protocol command numbers used by the T-LSM firmware 5.xx implementation.

Enumerator
cmdHome 
cmdRenumber 
cmdStoreCurrentPosition 
cmdReturnStoredPosition 
cmdMoveToStoredPosition 
cmdMoveAbsolute 
cmdMoveRelative 
cmdStop 
cmdSetHoldCurrent 
cmdSetDeviceMode 
cmdSetTargetSpeed 
cmdSetMaximumPosition 
cmdSetCurrentPosition 
cmdReturnFirmwareVersion 
cmdReturnSetting 
cmdReturnStatus 
cmdReturnCurrentPosition 
cmdReturnSerialNumber 

Definition at line 34 of file zaberBinaryStage.hpp.

◆ modeBits

template<class parentT >
enum MagAOX::app::zaberBinaryStage::modeBits : int32_t

Device-mode bits used by the implementation.

Enumerator
modeDisableAutoReply 
modeDisablePotentiometer 
modeHomeStatus 

Definition at line 57 of file zaberBinaryStage.hpp.

Constructor & Destructor Documentation

◆ zaberBinaryStage() [1/2]

template<class parentT >
MagAOX::app::zaberBinaryStage< parentT >::zaberBinaryStage ( )
delete

Default constructor deleted because stages require a parent app.

◆ zaberBinaryStage() [2/2]

template<class parentT >
MagAOX::app::zaberBinaryStage< parentT >::zaberBinaryStage ( parentT *  parent)
inline

Construct the stage helper.

Parameters
[in]parentthe parent application

Definition at line 163 of file zaberBinaryStage.hpp.

References MagAOX::app::zaberBinaryStage< parentT >::m_parent.

Member Function Documentation

◆ axisNumber() [1/2]

template<class parentT >
int MagAOX::app::zaberBinaryStage< parentT >::axisNumber ( )

Get the axis number.

Definition at line 412 of file zaberBinaryStage.hpp.

◆ axisNumber() [2/2]

template<class parentT >
int MagAOX::app::zaberBinaryStage< parentT >::axisNumber ( const int &  an)

Set the axis number.

Parameters
[in]anthe new axis number

Definition at line 418 of file zaberBinaryStage.hpp.

◆ commandStatus()

template<class parentT >
bool MagAOX::app::zaberBinaryStage< parentT >::commandStatus ( )

Get the status of the last command.

Definition at line 425 of file zaberBinaryStage.hpp.

◆ deviceAddress() [1/2]

template<class parentT >
int MagAOX::app::zaberBinaryStage< parentT >::deviceAddress ( )

Get the device address.

Definition at line 399 of file zaberBinaryStage.hpp.

◆ deviceAddress() [2/2]

template<class parentT >
int MagAOX::app::zaberBinaryStage< parentT >::deviceAddress ( const int &  da)

Set the device address.

Parameters
[in]dathe new device address

Definition at line 405 of file zaberBinaryStage.hpp.

◆ deviceStatus()

template<class parentT >
char MagAOX::app::zaberBinaryStage< parentT >::deviceStatus ( )

Get the current device status.

Definition at line 431 of file zaberBinaryStage.hpp.

◆ enableKnob()

template<class parentT >
int MagAOX::app::zaberBinaryStage< parentT >::enableKnob ( z_port  port,
bool  enable 
)

Disable the manual knob and asynchronous command replies.

Parameters
[in]enablethe port with which to communicate

Definition at line 833 of file zaberBinaryStage.hpp.

References MagAOX::app::MagAOXApp< true >::log().

◆ estop()

template<class parentT >
int MagAOX::app::zaberBinaryStage< parentT >::estop ( z_port  port)

Emergency-stop the stage.

Parameters
[in]portthe port with which to communicate

Definition at line 938 of file zaberBinaryStage.hpp.

◆ getKnob()

template<class parentT >
int MagAOX::app::zaberBinaryStage< parentT >::getKnob ( z_port  port)

Get the knob enabled status.

Parameters
[in]portthe port with which to communicate

Definition at line 771 of file zaberBinaryStage.hpp.

◆ getMaxPos()

template<class parentT >
int MagAOX::app::zaberBinaryStage< parentT >::getMaxPos ( z_port  port)

Get the maximum position from the device.

Parameters
[in]portthe port with which to communicate

Definition at line 742 of file zaberBinaryStage.hpp.

◆ getParked()

template<class parentT >
int MagAOX::app::zaberBinaryStage< parentT >::getParked ( z_port  port)

Get the parked state for MagAO-X compatibility.

Parameters
[in]portthe port with which to communicate

Definition at line 756 of file zaberBinaryStage.hpp.

◆ getSetting()

template<class parentT >
int MagAOX::app::zaberBinaryStage< parentT >::getSetting ( int32_t &  value,
z_port  port,
uint8_t  settingNumber 
)

Return a setting value from the device.

Parameters
[out]valuethe setting value
[in]portthe port with which to communicate
[in]settingNumberthe setting command number to query

Definition at line 736 of file zaberBinaryStage.hpp.

◆ getWarnings()

template<class parentT >
int MagAOX::app::zaberBinaryStage< parentT >::getWarnings ( z_port  port)

Refresh warning-equivalent state from firmware 5.xx information.

Parameters
[in]portthe port with which to communicate

Definition at line 1103 of file zaberBinaryStage.hpp.

◆ home()

template<class parentT >
int MagAOX::app::zaberBinaryStage< parentT >::home ( z_port  port)

Home the stage.

Parameters
[in]portthe port with which to communicate

Definition at line 944 of file zaberBinaryStage.hpp.

◆ homing()

template<class parentT >
bool MagAOX::app::zaberBinaryStage< parentT >::homing ( )

Get the homing state.

Definition at line 437 of file zaberBinaryStage.hpp.

◆ knobEnabled()

template<class parentT >
bool MagAOX::app::zaberBinaryStage< parentT >::knobEnabled ( )

Get the knob state.

Definition at line 455 of file zaberBinaryStage.hpp.

◆ lastHomed()

template<class parentT >
time_t MagAOX::app::zaberBinaryStage< parentT >::lastHomed ( )

Get the last home time.

Definition at line 443 of file zaberBinaryStage.hpp.

◆ maxPos()

template<class parentT >
long MagAOX::app::zaberBinaryStage< parentT >::maxPos ( )

Get the maximum position.

Definition at line 473 of file zaberBinaryStage.hpp.

◆ moveAbs()

template<class parentT >
int MagAOX::app::zaberBinaryStage< parentT >::moveAbs ( z_port  port,
long  rawPos 
)

Move to a new absolute position.

Parameters
[in]portthe port with which to communicate
[in]rawPosthe position to move to in microsteps

Definition at line 1053 of file zaberBinaryStage.hpp.

◆ name() [1/2]

template<class parentT >
std::string MagAOX::app::zaberBinaryStage< parentT >::name ( )

Get the stage name.

Definition at line 373 of file zaberBinaryStage.hpp.

◆ name() [2/2]

template<class parentT >
int MagAOX::app::zaberBinaryStage< parentT >::name ( const std::string &  n)

Set the stage name.

Parameters
[in]nthe new stage name

Definition at line 379 of file zaberBinaryStage.hpp.

◆ onPowerOff()

template<class parentT >
int MagAOX::app::zaberBinaryStage< parentT >::onPowerOff ( )

Clear transient state on power-off.

Definition at line 1138 of file zaberBinaryStage.hpp.

◆ park()

template<class parentT >
int MagAOX::app::zaberBinaryStage< parentT >::park ( z_port  port)

Mark the stage parked using MagAO-X bookkeeping semantics.

Parameters
[in]portthe port with which to communicate

Definition at line 959 of file zaberBinaryStage.hpp.

◆ parked()

template<class parentT >
int MagAOX::app::zaberBinaryStage< parentT >::parked ( )

Get the parked state.

Definition at line 449 of file zaberBinaryStage.hpp.

◆ queryCommand()

template<class parentT >
int MagAOX::app::zaberBinaryStage< parentT >::queryCommand ( int32_t &  response,
z_port  port,
uint8_t  commandNumber,
int32_t  data,
uint8_t  expectedReply 
)

Send a command and wait for the corresponding binary reply.

Parameters
[out]responsedecoded reply data
[in]portthe port with which to communicate
[in]commandNumberthe command number to send
[in]datathe command data
[in]expectedReplythe expected reply command number

Definition at line 630 of file zaberBinaryStage.hpp.

References MagAOX::app::MagAOXApp< true >::log(), Z_SUCCESS, zb_decode(), zb_encode(), zb_receive(), and zb_send().

◆ rawPos()

template<class parentT >
long MagAOX::app::zaberBinaryStage< parentT >::rawPos ( )

Get the current raw position.

Definition at line 461 of file zaberBinaryStage.hpp.

◆ readStateFile()

template<class parentT >
int MagAOX::app::zaberBinaryStage< parentT >::readStateFile ( std::ifstream &  fin)

Read the state file used by the low-level app.

Parameters
[in]finan open input stream

Definition at line 1179 of file zaberBinaryStage.hpp.

References MagAOX::app::MagAOXApp< true >::log().

◆ recallParkPosition()

template<class parentT >
int MagAOX::app::zaberBinaryStage< parentT >::recallParkPosition ( z_port  port)

Recall the MagAO-X parked position from device non-volatile memory.

Parameters
[in]portthe port with which to communicate

Definition at line 990 of file zaberBinaryStage.hpp.

◆ restoreParkedState()

template<class parentT >
int MagAOX::app::zaberBinaryStage< parentT >::restoreParkedState ( z_port  port)

Restore parked state after a power cycle if device and disk state agree.

Parameters
[in]portthe port with which to communicate

Definition at line 1008 of file zaberBinaryStage.hpp.

References MagAOX::app::MagAOXApp< true >::log().

◆ sendCommandNoReply()

template<class parentT >
int MagAOX::app::zaberBinaryStage< parentT >::sendCommandNoReply ( z_port  port,
uint8_t  commandNumber,
int32_t  data 
)

Send a command for which no reply is expected.

Parameters
[in]portthe port with which to communicate
[in]commandNumberthe command number to send
[in]datathe command data

Definition at line 702 of file zaberBinaryStage.hpp.

References MagAOX::app::MagAOXApp< true >::log(), Z_SUCCESS, zb_encode(), and zb_send().

◆ serial() [1/2]

template<class parentT >
std::string MagAOX::app::zaberBinaryStage< parentT >::serial ( )

Get the stage serial number.

Definition at line 386 of file zaberBinaryStage.hpp.

◆ serial() [2/2]

template<class parentT >
int MagAOX::app::zaberBinaryStage< parentT >::serial ( const std::string &  s)

Set the stage serial number.

Parameters
[in]sthe new stage serial number

Definition at line 392 of file zaberBinaryStage.hpp.

◆ setHoldCurrent()

template<class parentT >
int MagAOX::app::zaberBinaryStage< parentT >::setHoldCurrent ( z_port  port,
int32_t  value 
)

Set the hold current used while the stage is idle.

Parameters
[in]portthe port with which to communicate
[in]valuethe hold current command value

Definition at line 899 of file zaberBinaryStage.hpp.

References MagAOX::app::MagAOXApp< true >::log().

◆ setTargetSpeed()

template<class parentT >
int MagAOX::app::zaberBinaryStage< parentT >::setTargetSpeed ( z_port  port,
int32_t  speed 
)

Set the target speed used for absolute and relative moves.

Parameters
[in]portthe port with which to communicate
[in]speedthe target speed command value

Definition at line 874 of file zaberBinaryStage.hpp.

References MagAOX::app::MagAOXApp< true >::log().

◆ stop()

template<class parentT >
int MagAOX::app::zaberBinaryStage< parentT >::stop ( z_port  port)

Stop the stage.

Parameters
[in]portthe port with which to communicate

Definition at line 924 of file zaberBinaryStage.hpp.

◆ targetSpeed() [1/2]

template<class parentT >
int32_t MagAOX::app::zaberBinaryStage< parentT >::targetSpeed ( )

Get the configured target speed.

Definition at line 479 of file zaberBinaryStage.hpp.

◆ targetSpeed() [2/2]

template<class parentT >
int MagAOX::app::zaberBinaryStage< parentT >::targetSpeed ( const int32_t &  speed)

Set the configured target speed.

Parameters
[in]speedthe target speed command value

Definition at line 485 of file zaberBinaryStage.hpp.

◆ temp()

template<class parentT >
float MagAOX::app::zaberBinaryStage< parentT >::temp ( )

Get the driver temperature.

Definition at line 498 of file zaberBinaryStage.hpp.

◆ tgtPos()

template<class parentT >
long MagAOX::app::zaberBinaryStage< parentT >::tgtPos ( )

Get the target raw position.

Definition at line 467 of file zaberBinaryStage.hpp.

◆ unpark()

template<class parentT >
int MagAOX::app::zaberBinaryStage< parentT >::unpark ( z_port  port)

Clear the parked bookkeeping state.

Parameters
[in]portthe port with which to communicate

Definition at line 983 of file zaberBinaryStage.hpp.

◆ unsetWarnings()

template<class parentT >
int MagAOX::app::zaberBinaryStage< parentT >::unsetWarnings ( )

Clear all warning flags.

Definition at line 1076 of file zaberBinaryStage.hpp.

◆ updateLastHomed()

template<class parentT >
int MagAOX::app::zaberBinaryStage< parentT >::updateLastHomed ( bool  wasHoming)

Refresh the stored last-home timestamp when a home completion is detected.

Parameters
[in]wasHomingwhether the stage was homing before the latest status refresh

Definition at line 1124 of file zaberBinaryStage.hpp.

References MagAOX::app::MagAOXApp< true >::log().

◆ updatePos()

template<class parentT >
int MagAOX::app::zaberBinaryStage< parentT >::updatePos ( z_port  port)

Update the current position and derived motion state.

Parameters
[in]portthe port with which to communicate

Definition at line 785 of file zaberBinaryStage.hpp.

◆ updateTemp()

template<class parentT >
int MagAOX::app::zaberBinaryStage< parentT >::updateTemp ( z_port  port)

Update the stage temperature, if supported.

Parameters
[in]portthe port with which to communicate

Definition at line 826 of file zaberBinaryStage.hpp.

◆ warn()

template<class parentT >
bool MagAOX::app::zaberBinaryStage< parentT >::warn ( )

Get whether any warning-equivalent flag is set.

Definition at line 492 of file zaberBinaryStage.hpp.

◆ warnFB()

template<class parentT >
bool MagAOX::app::zaberBinaryStage< parentT >::warnFB ( )

Get the FB warning flag.

Definition at line 534 of file zaberBinaryStage.hpp.

◆ warnFD()

template<class parentT >
bool MagAOX::app::zaberBinaryStage< parentT >::warnFD ( )

Get the driver-disabled warning flag.

Definition at line 510 of file zaberBinaryStage.hpp.

◆ warnFE()

template<class parentT >
bool MagAOX::app::zaberBinaryStage< parentT >::warnFE ( )

Get the FE warning flag.

Definition at line 546 of file zaberBinaryStage.hpp.

◆ warnFP()

template<class parentT >
bool MagAOX::app::zaberBinaryStage< parentT >::warnFP ( )

Get the FP warning flag.

Definition at line 540 of file zaberBinaryStage.hpp.

◆ warnFQ()

template<class parentT >
bool MagAOX::app::zaberBinaryStage< parentT >::warnFQ ( )

Get the FQ warning flag.

Definition at line 516 of file zaberBinaryStage.hpp.

◆ warnFS()

template<class parentT >
bool MagAOX::app::zaberBinaryStage< parentT >::warnFS ( )

Get the FS warning flag.

Definition at line 522 of file zaberBinaryStage.hpp.

◆ warnFT()

template<class parentT >
bool MagAOX::app::zaberBinaryStage< parentT >::warnFT ( )

Get the FT warning flag.

Definition at line 528 of file zaberBinaryStage.hpp.

◆ warningState()

template<class parentT >
bool MagAOX::app::zaberBinaryStage< parentT >::warningState ( )

Get whether any warning-equivalent flag is set.

Definition at line 504 of file zaberBinaryStage.hpp.

◆ warnNC()

template<class parentT >
bool MagAOX::app::zaberBinaryStage< parentT >::warnNC ( )

Get the NC warning flag.

Definition at line 594 of file zaberBinaryStage.hpp.

◆ warnND()

template<class parentT >
bool MagAOX::app::zaberBinaryStage< parentT >::warnND ( )

Get the ND warning flag.

Definition at line 606 of file zaberBinaryStage.hpp.

◆ warnNI()

template<class parentT >
bool MagAOX::app::zaberBinaryStage< parentT >::warnNI ( )

Get the NI warning flag.

Definition at line 600 of file zaberBinaryStage.hpp.

◆ warnNJ()

template<class parentT >
bool MagAOX::app::zaberBinaryStage< parentT >::warnNJ ( )

Get the NJ warning flag.

Definition at line 618 of file zaberBinaryStage.hpp.

◆ warnNU()

template<class parentT >
bool MagAOX::app::zaberBinaryStage< parentT >::warnNU ( )

Get the NU warning flag.

Definition at line 612 of file zaberBinaryStage.hpp.

◆ warnUNK()

template<class parentT >
bool MagAOX::app::zaberBinaryStage< parentT >::warnUNK ( )

Get the unknown-warning flag.

Definition at line 624 of file zaberBinaryStage.hpp.

◆ warnWH()

template<class parentT >
bool MagAOX::app::zaberBinaryStage< parentT >::warnWH ( )

Get the WH warning flag.

Definition at line 552 of file zaberBinaryStage.hpp.

◆ warnWL()

template<class parentT >
bool MagAOX::app::zaberBinaryStage< parentT >::warnWL ( )

Get the WL warning flag.

Definition at line 558 of file zaberBinaryStage.hpp.

◆ warnWM()

template<class parentT >
bool MagAOX::app::zaberBinaryStage< parentT >::warnWM ( )

Get the WM warning flag.

Definition at line 582 of file zaberBinaryStage.hpp.

◆ warnWP()

template<class parentT >
bool MagAOX::app::zaberBinaryStage< parentT >::warnWP ( )

Get the WP warning flag.

Definition at line 564 of file zaberBinaryStage.hpp.

◆ warnWR()

template<class parentT >
bool MagAOX::app::zaberBinaryStage< parentT >::warnWR ( )

Get the WR warning flag.

Definition at line 588 of file zaberBinaryStage.hpp.

◆ warnWT()

template<class parentT >
bool MagAOX::app::zaberBinaryStage< parentT >::warnWT ( )

Get the WT warning flag.

Definition at line 576 of file zaberBinaryStage.hpp.

◆ warnWV()

template<class parentT >
bool MagAOX::app::zaberBinaryStage< parentT >::warnWV ( )

Get the WV warning flag.

Definition at line 570 of file zaberBinaryStage.hpp.

◆ writeStateFile()

template<class parentT >
int MagAOX::app::zaberBinaryStage< parentT >::writeStateFile ( std::ofstream &  fout)

Write the state file used by the low-level app.

Parameters
[in]foutan open output stream

Definition at line 1149 of file zaberBinaryStage.hpp.

References MagAOX::app::MagAOXApp< true >::log().

Member Data Documentation

◆ m_axisNumber

template<class parentT >
int MagAOX::app::zaberBinaryStage< parentT >::m_axisNumber { 0 }
protected

Axis number placeholder for future multi-axis support.

Definition at line 81 of file zaberBinaryStage.hpp.

◆ m_commandStatus

template<class parentT >
bool MagAOX::app::zaberBinaryStage< parentT >::m_commandStatus { true }
protected

Whether the most recent command was accepted.

Definition at line 84 of file zaberBinaryStage.hpp.

◆ m_deviceAddress

template<class parentT >
int MagAOX::app::zaberBinaryStage< parentT >::m_deviceAddress { -1 }
protected

Current binary device address.

Definition at line 78 of file zaberBinaryStage.hpp.

◆ m_deviceStatus

template<class parentT >
char MagAOX::app::zaberBinaryStage< parentT >::m_deviceStatus { 'U' }
protected

Current device state mapped to ASCII-app semantics.

Definition at line 87 of file zaberBinaryStage.hpp.

◆ m_hasParkPos

template<class parentT >
bool MagAOX::app::zaberBinaryStage< parentT >::m_hasParkPos { false }
protected

Whether a parked position has been recovered from device non-volatile memory.

Definition at line 114 of file zaberBinaryStage.hpp.

◆ m_hasStateFile

template<class parentT >
bool MagAOX::app::zaberBinaryStage< parentT >::m_hasStateFile { false }
protected

Whether a parked state file has been loaded from disk.

Definition at line 117 of file zaberBinaryStage.hpp.

◆ m_homing

template<class parentT >
bool MagAOX::app::zaberBinaryStage< parentT >::m_homing { false }
protected

Whether the stage is currently homing.

Definition at line 90 of file zaberBinaryStage.hpp.

◆ m_knobEnabled

template<class parentT >
bool MagAOX::app::zaberBinaryStage< parentT >::m_knobEnabled { false }
protected

whether potentiometer knob is enabled

Definition at line 129 of file zaberBinaryStage.hpp.

◆ m_lastHomed

template<class parentT >
timespec MagAOX::app::zaberBinaryStage< parentT >::m_lastHomed { 0, 0 }
protected

Time stamp of the last successful home operation.

Definition at line 93 of file zaberBinaryStage.hpp.

◆ m_maxPos

template<class parentT >
long MagAOX::app::zaberBinaryStage< parentT >::m_maxPos { -1 }
protected

Maximum position in microsteps.

Definition at line 108 of file zaberBinaryStage.hpp.

◆ m_name

template<class parentT >
std::string MagAOX::app::zaberBinaryStage< parentT >::m_name
protected

Configured stage name used in INDI properties.

Definition at line 72 of file zaberBinaryStage.hpp.

◆ m_parent

template<class parentT >
parentT* MagAOX::app::zaberBinaryStage< parentT >::m_parent { nullptr }
protected

Parent application used for logging and power-state checks.

Definition at line 69 of file zaberBinaryStage.hpp.

Referenced by MagAOX::app::zaberBinaryStage< parentT >::zaberBinaryStage().

◆ m_parked

template<class parentT >
bool MagAOX::app::zaberBinaryStage< parentT >::m_parked { false }
protected

Whether MagAO-X currently considers this stage parked.

Definition at line 96 of file zaberBinaryStage.hpp.

◆ m_parkPos

template<class parentT >
long MagAOX::app::zaberBinaryStage< parentT >::m_parkPos { 0 }
protected

Emulated parked position in microsteps.

Definition at line 111 of file zaberBinaryStage.hpp.

◆ m_rawPos

template<class parentT >
long MagAOX::app::zaberBinaryStage< parentT >::m_rawPos { 0 }
protected

Current raw position in microsteps.

Definition at line 99 of file zaberBinaryStage.hpp.

◆ m_serial

template<class parentT >
std::string MagAOX::app::zaberBinaryStage< parentT >::m_serial
protected

Configured stage serial number.

Definition at line 75 of file zaberBinaryStage.hpp.

◆ m_stateFileParked

template<class parentT >
bool MagAOX::app::zaberBinaryStage< parentT >::m_stateFileParked { false }
protected

Parked flag loaded from the parked state file.

Definition at line 123 of file zaberBinaryStage.hpp.

◆ m_stateFileRawPos

template<class parentT >
long MagAOX::app::zaberBinaryStage< parentT >::m_stateFileRawPos { 0 }
protected

Raw position loaded from the parked state file.

Definition at line 120 of file zaberBinaryStage.hpp.

◆ m_targetSpeed

template<class parentT >
int32_t MagAOX::app::zaberBinaryStage< parentT >::m_targetSpeed { 1000 }
protected

Configured target speed command value for this stage.

Definition at line 105 of file zaberBinaryStage.hpp.

◆ m_temp

template<class parentT >
float MagAOX::app::zaberBinaryStage< parentT >::m_temp { -999.0 }
protected

Last reported stage temperature. Firmware 5.35 does not expose this directly.

Definition at line 126 of file zaberBinaryStage.hpp.

◆ m_tgtPos

template<class parentT >
long MagAOX::app::zaberBinaryStage< parentT >::m_tgtPos { 0 }
protected

Last target position sent to the device in microsteps.

Definition at line 102 of file zaberBinaryStage.hpp.

◆ m_warn

template<class parentT >
bool MagAOX::app::zaberBinaryStage< parentT >::m_warn { false }
protected

Whether any warning-equivalent condition is active.

Definition at line 132 of file zaberBinaryStage.hpp.

◆ m_warnFB

template<class parentT >
bool MagAOX::app::zaberBinaryStage< parentT >::m_warnFB { false }
protected

Definition at line 141 of file zaberBinaryStage.hpp.

◆ m_warnFD

template<class parentT >
bool MagAOX::app::zaberBinaryStage< parentT >::m_warnFD { false }
protected

Driver disabled warning flag.

Definition at line 135 of file zaberBinaryStage.hpp.

◆ m_warnFE

template<class parentT >
bool MagAOX::app::zaberBinaryStage< parentT >::m_warnFE { false }
protected

Definition at line 143 of file zaberBinaryStage.hpp.

◆ m_warnFP

template<class parentT >
bool MagAOX::app::zaberBinaryStage< parentT >::m_warnFP { false }
protected

Definition at line 142 of file zaberBinaryStage.hpp.

◆ m_warnFQ

template<class parentT >
bool MagAOX::app::zaberBinaryStage< parentT >::m_warnFQ { false }
protected

Device-specific warning flag placeholders retained for API compatibility.

Definition at line 138 of file zaberBinaryStage.hpp.

◆ m_warnFS

template<class parentT >
bool MagAOX::app::zaberBinaryStage< parentT >::m_warnFS { false }
protected

Definition at line 139 of file zaberBinaryStage.hpp.

◆ m_warnFT

template<class parentT >
bool MagAOX::app::zaberBinaryStage< parentT >::m_warnFT { false }
protected

Definition at line 140 of file zaberBinaryStage.hpp.

◆ m_warnNC

template<class parentT >
bool MagAOX::app::zaberBinaryStage< parentT >::m_warnNC { false }
protected

Definition at line 151 of file zaberBinaryStage.hpp.

◆ m_warnND

template<class parentT >
bool MagAOX::app::zaberBinaryStage< parentT >::m_warnND { false }
protected

Definition at line 153 of file zaberBinaryStage.hpp.

◆ m_warnNI

template<class parentT >
bool MagAOX::app::zaberBinaryStage< parentT >::m_warnNI { false }
protected

Definition at line 152 of file zaberBinaryStage.hpp.

◆ m_warnNJ

template<class parentT >
bool MagAOX::app::zaberBinaryStage< parentT >::m_warnNJ { false }
protected

Definition at line 155 of file zaberBinaryStage.hpp.

◆ m_warnNU

template<class parentT >
bool MagAOX::app::zaberBinaryStage< parentT >::m_warnNU { false }
protected

Definition at line 154 of file zaberBinaryStage.hpp.

◆ m_warnUNK

template<class parentT >
bool MagAOX::app::zaberBinaryStage< parentT >::m_warnUNK { false }
protected

Definition at line 156 of file zaberBinaryStage.hpp.

◆ m_warnWH

template<class parentT >
bool MagAOX::app::zaberBinaryStage< parentT >::m_warnWH { false }
protected

Definition at line 144 of file zaberBinaryStage.hpp.

◆ m_warnWL

template<class parentT >
bool MagAOX::app::zaberBinaryStage< parentT >::m_warnWL { false }
protected

Definition at line 145 of file zaberBinaryStage.hpp.

◆ m_warnWM

template<class parentT >
bool MagAOX::app::zaberBinaryStage< parentT >::m_warnWM { false }
protected

Definition at line 149 of file zaberBinaryStage.hpp.

◆ m_warnWP

template<class parentT >
bool MagAOX::app::zaberBinaryStage< parentT >::m_warnWP { false }
protected

Definition at line 146 of file zaberBinaryStage.hpp.

◆ m_warnWR

template<class parentT >
bool MagAOX::app::zaberBinaryStage< parentT >::m_warnWR { false }
protected

Definition at line 150 of file zaberBinaryStage.hpp.

◆ m_warnWT

template<class parentT >
bool MagAOX::app::zaberBinaryStage< parentT >::m_warnWT { false }
protected

Definition at line 148 of file zaberBinaryStage.hpp.

◆ m_warnWV

template<class parentT >
bool MagAOX::app::zaberBinaryStage< parentT >::m_warnWV { false }
protected

Definition at line 147 of file zaberBinaryStage.hpp.

◆ parkPositionRegister

template<class parentT >
constexpr int32_t MagAOX::app::zaberBinaryStage< parentT >::parkPositionRegister = 0
staticconstexpr

Stored-position register used to persist the MagAO-X parked position.

Definition at line 65 of file zaberBinaryStage.hpp.


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