43 #ifndef _MLAB_SCITOS_FUNCTION_BLOCK_FIXED_VOLTAGE_OUTPUT_H_ 44 #define _MLAB_SCITOS_FUNCTION_BLOCK_FIXED_VOLTAGE_OUTPUT_H_ 48 namespace mira {
namespace robot {
78 template <
typename Reflector>
83 r.property(
"MaxCurrent",
93 r.roproperty(
"Current",
95 "Current current [A]");
97 r.roproperty(
"Voltage",
99 "Current voltage [V]");
101 r.roproperty(
"Status",
105 r.roproperty(
"InitState",
107 "Initial state after power on.",
122 uint32 maxCurrent = (uint32)(current*1000.0f);
172 std::string r = (status & 0x01) ?
"on" :
"off";
173 if ((status & 0x01) && (status & 0x02))
248 template <
typename Reflector>
253 r.property(
"MinCurrent",
268 uint32 minCurrent = (uint32)(current*1000.0f);
332 template <
typename Reflector>
337 r.property(
"MinCurrent",
342 r.property(
"MaxCurrent",
347 r.property(
"Enabled",
352 r.roproperty(
"Current",
354 "Current current [A]");
356 r.roproperty(
"Voltage",
358 "Current voltage [V]");
360 r.roproperty(
"Status",
364 r.roproperty(
"InitState",
366 "Initial state after power on.",
381 int32 minCurrent = (int32)(current*1000.0f);
398 int32 maxCurrent = (int32)(current*1000.0f);
448 std::string r = (state & 0x01) ?
"on" :
"off";
452 r +=
", OverVoltage";
454 r +=
", UnderVoltage";
456 r +=
", OverCurrent";
458 r +=
", UnderCurrent";
460 r +=
", ExternalError";
462 r +=
", UnderCurrentTimeout";
464 r +=
", WaitForStartup";
void reflect(Reflector &r)
Reflect for serialization.
Definition: FixedVoltageOutput.h:79
void setMinCurrent(float current)
Set the minimum current.
Definition: FixedVoltageOutput.h:379
float getCurrent()
Return the current current.
Definition: FixedVoltageOutput.h:153
mira::can::CANOpenSDOClientPtr sdoClient
Definition: FunctionBlock.h:93
FixedVoltageOutput_v0_3()
Constructor.
Definition: FixedVoltageOutput.h:218
uint8 subIndexMaxCurrent
Subindex for setting/retrieving max current.
Definition: FixedVoltageOutput.h:487
void setMinCurrent(float current)
Set the minimum current.
Definition: FixedVoltageOutput.h:266
float getMaxCurrent()
Return the maximum value for current.
Definition: FixedVoltageOutput.h:129
void reflect(Reflector &r)
Reflect for serialization.
Definition: FixedVoltageOutput.h:249
void reflect(Reflector &r)
Reflect for serialization.
Definition: FixedVoltageOutput.h:333
void setMaxCurrent(float current)
Set the maximum current.
Definition: FixedVoltageOutput.h:396
uint8 subIndexInitState
Subindex for retrieving the initial state.
Definition: FixedVoltageOutput.h:205
uint8 subIndexCurrent
Subindex for retrieving the current.
Definition: FixedVoltageOutput.h:490
PropertyHint enumeration(const std::string &values)
#define MIRA_REFLECT_BASE(reflector, BaseClass)
uint8 subIndexVoltage
Subindex for retrieving the voltage.
Definition: FixedVoltageOutput.h:199
uint32 getInitState()
Return the initial state of the port.
Definition: FixedVoltageOutput.h:181
bool isEnabled()
Is the power supply enabled.
Definition: FixedVoltageOutput.h:421
Function block for fixed voltage v2.0 (0x01010200)
Definition: FixedVoltageOutput.h:308
void enable(bool enable)
Enable the power supply.
Definition: FixedVoltageOutput.h:413
uint8 subIndexInitState
Subindex for retrieving the initial state.
Definition: FixedVoltageOutput.h:499
Function block for fixed voltage v1.1 (since 0x01010101)
Definition: FixedVoltageOutput.h:292
uint8 nodeID
ID of the can node.
Definition: FunctionBlock.h:87
uint8 subIndexEnable
Subindex for enabling the power supply.
Definition: FixedVoltageOutput.h:481
FixedVoltageOutput_v1_1()
Constructor.
Definition: FixedVoltageOutput.h:297
void enable(bool enable)
Enable the power supply.
Definition: FixedVoltageOutput.h:137
virtual ~FixedVoltageOutput_v0_2()
Destructor.
Definition: FixedVoltageOutput.h:75
virtual ~FixedVoltageOutput_v2()
Destructor.
Definition: FixedVoltageOutput.h:329
virtual std::string getStatus()
Return the status [(on,off)|error] of the power supply.
Definition: FixedVoltageOutput.h:169
Function block for fixed voltage v0.2 (0x01010002)
Definition: FixedVoltageOutput.h:55
float getMinCurrent()
Return the minimum value for current.
Definition: FixedVoltageOutput.h:388
FixedVoltageOutput_v0_2()
Constructor.
Definition: FixedVoltageOutput.h:63
float getMaxCurrent()
Return the maximum value for current.
Definition: FixedVoltageOutput.h:405
#define MIRA_OBJECT(classIdentifier)
void setMaxCurrent(float current)
Set the maximum current.
Definition: FixedVoltageOutput.h:120
Function block for fixed voltage v0.3 (since 0x01010003)
Definition: FixedVoltageOutput.h:213
virtual std::string getStatus()
Return the status [(on,off)|error(s)] of the power supply.
Definition: FixedVoltageOutput.h:445
uint8 subIndexVoltage
Subindex for retrieving the voltage.
Definition: FixedVoltageOutput.h:493
uint8 subIndexCurrent
Subindex for retrieving the current.
Definition: FixedVoltageOutput.h:196
uint8 subIndexStatus
Subindex for retrieving the status.
Definition: FixedVoltageOutput.h:496
uint8 subIndexMinCurrent
Subindex for setting/retrieving min current.
Definition: FixedVoltageOutput.h:284
uint32 functionBlockID
ID of the function block.
Definition: FunctionBlock.h:84
Definition: FunctionBlock.h:53
float getVoltage()
Return the current voltage.
Definition: FixedVoltageOutput.h:161
uint8 getInitState()
Return the initial state of the port.
Definition: FixedVoltageOutput.h:472
uint8 subIndexMaxCurrent
Subindex for setting/retrieving max current.
Definition: FixedVoltageOutput.h:193
uint8 subIndexStatus
Subindex for retrieving the status.
Definition: FixedVoltageOutput.h:202
Base class for different SCITOS CAN function blocks.
uint8 subIndexMinCurrent
Subindex for setting/retrieving min current.
Definition: FixedVoltageOutput.h:484
bool isEnabled()
Is the power supply enabled.
Definition: FixedVoltageOutput.h:145
float getVoltage()
Return the current voltage.
Definition: FixedVoltageOutput.h:437
Function block for fixed voltage v0.4 (0x01010004)
Definition: FixedVoltageOutput.h:232
uint8 subIndexEnable
Subindex for enabling the power supply.
Definition: FixedVoltageOutput.h:190
FixedVoltageOutput_v0_4()
Constructor.
Definition: FixedVoltageOutput.h:237
uint16 index
Index.
Definition: FunctionBlock.h:90
float getMinCurrent()
Return the minimum value for current.
Definition: FixedVoltageOutput.h:275
FixedVoltageOutput_v2()
Constructor.
Definition: FixedVoltageOutput.h:316
float getCurrent()
Return the current current.
Definition: FixedVoltageOutput.h:429