Definition at line 574 of file TractionModem.hxx.
◆ ModemTrain()
| traction_modem::ModemTrain::ModemTrain |
( |
Service * |
service | ) |
|
|
inline |
◆ get_cv_space()
◆ get_emergencystop()
| bool traction_modem::ModemTrain::get_emergencystop |
( |
| ) |
|
|
inlineoverridevirtual |
◆ get_fn()
| uint16_t traction_modem::ModemTrain::get_fn |
( |
uint32_t |
address | ) |
|
|
inlineoverridevirtual |
◆ get_speed()
◆ legacy_address()
| uint32_t traction_modem::ModemTrain::legacy_address |
( |
| ) |
|
|
inlineoverridevirtual |
- Returns
- the legacy (DCC) address of this train. This value is used in determining the train's NMRAnet NodeID.
- Todo:
- (balazs.racz) This function should not be here. Specifying the NodeID should be more generic, but it is not clear what would be the best interface for that.
- Todo:
- what should this be?
Implements openlcb::TrainImpl.
Definition at line 718 of file TractionModem.hxx.
◆ legacy_address_type()
◆ send_packet()
| void traction_modem::ModemTrain::send_packet |
( |
Defs::Payload |
p | ) |
|
|
inlineprivate |
◆ set_emergencystop()
| void traction_modem::ModemTrain::set_emergencystop |
( |
| ) |
|
|
inlineoverridevirtual |
◆ set_fn()
| void traction_modem::ModemTrain::set_fn |
( |
uint32_t |
address, |
|
|
uint16_t |
value |
|
) |
| |
|
inlineoverridevirtual |
Sets the value of a function.
- Parameters
-
| address | is a 24-bit address of the function to set. For legacy DCC locomotives, see TractionDefs for the address definitions (0=light, 1-28= traditional function buttons). |
| value | is the function value. For binary functions, any non-zero value sets the function to on, zero sets it to off. |
- Todo:
- The following switch statement is for hardware testing only. In production software, the main MCU should have the on/off logical by "output" number, and not by function number. The main MCU should instruct the modem of the activity state.
Implements openlcb::TrainImpl.
Definition at line 642 of file TractionModem.hxx.
◆ set_is_active()
| void traction_modem::ModemTrain::set_is_active |
( |
bool |
is_active | ) |
|
|
inline |
Set the active state of the wireless control.
- Parameters
-
| is_active | true if under wireless control, else false |
Definition at line 593 of file TractionModem.hxx.
◆ set_speed()
Sets the speed of the locomotive.
- Parameters
-
| speed | is the requested scale speed in m/s. The sign of the number means the direction. |
Implements openlcb::TrainImpl.
Definition at line 609 of file TractionModem.hxx.
◆ start()
| void traction_modem::ModemTrain::start |
( |
int |
uart_fd | ) |
|
|
inline |
◆ cvSpace_
| CvSpace traction_modem::ModemTrain::cvSpace_ {&txFlow_} |
|
private |
◆ fd_
| int traction_modem::ModemTrain::fd_ |
|
private |
◆ inEStop_
| bool traction_modem::ModemTrain::inEStop_ = false |
|
private |
True if the last set was estop, false if it was a speed.
Definition at line 744 of file TractionModem.hxx.
◆ isActive_
| bool traction_modem::ModemTrain::isActive_ |
|
private |
◆ isRunning_
| bool traction_modem::ModemTrain::isRunning_ = false |
|
private |
◆ lastSpeed_
◆ rxFlow_
| RxFlow traction_modem::ModemTrain::rxFlow_ |
|
private |
◆ txFlow_
| TxFlow traction_modem::ModemTrain::txFlow_ |
|
private |
The documentation for this class was generated from the following file: