|
| void | init () final |
| | Initialize Knitter object.
|
| |
| void | setUpInterrupt () final |
| | Initialize interrupt service routine for Knitter object.
|
| |
| void | isr () final |
| | Interrupt service routine.
|
| |
| Err_t | startKnitting (uint8_t startNeedle, uint8_t stopNeedle, uint8_t *pattern_start, bool continuousReportingEnabled) final |
| | Enter OpState::knit machine state.
|
| |
| Err_t | initMachine (Machine_t machine) final |
| | Initialize machine type.
|
| |
| void | encodePosition () final |
| | Record current encoder position.
|
| |
| bool | isReady () final |
| | Assess whether the Finite State Machine is ready to move from state OpState::init to OpState::ready.
|
| |
| void | knit () final |
| | Function that is repeatedly called during state OpState::knit
|
| |
| void | indState (Err_t error=ErrorCode::success) final |
| | Send indState message.
|
| |
| uint8_t | getStartOffset (const Direction_t direction) final |
| | Get start offset.
|
| |
| Machine_t | getMachineType () final |
| | Get knitting machine type.
|
| |
| bool | setNextLine (uint8_t lineNumber) final |
| | Set line number of next row to be knitted.
|
| |
| void | setLastLine () final |
| | Get value of last line flag.
|
| |
| void | setMachineType (Machine_t) final |
| | Set machine type.
|
| |
|
| void | reqLine (uint8_t lineNumber) |
| | Send reqLine message.
|
| |
| bool | calculatePixelAndSolenoid () |
| | Calculate the solenoid and pixel to be set.
|
| |
|
void | stopKnitting () const |
| | Finish knitting procedure.
|
| |
|
|
Machine_t | m_machineType |
| |
|
uint8_t | m_startNeedle |
| |
|
uint8_t | m_stopNeedle |
| |
|
uint8_t * | m_lineBuffer |
| |
|
bool | m_continuousReportingEnabled |
| |
|
uint8_t | m_position |
| |
|
Direction_t | m_direction |
| |
|
Direction_t | m_hallActive |
| |
|
BeltShift_t | m_beltShift |
| |
|
Carriage_t | m_carriage |
| |
|
bool | m_lineRequested |
| |
|
uint8_t | m_currentLineNumber |
| |
|
bool | m_lastLineFlag |
| |
|
uint8_t | m_sOldPosition |
| |
|
bool | m_firstRun |
| |
|
bool | m_workedOnLine |
| |
|
Direction_t | m_lastHall |
| |
|
uint8_t | m_solenoidToSet |
| |
|
uint8_t | m_pixelToSet |
| |
◆ calculatePixelAndSolenoid()
| bool Knitter::calculatePixelAndSolenoid |
( |
| ) |
|
|
private |
Calculate the solenoid and pixel to be set.
- Returns
true if successful, false otherwise.
References getStartOffset().
◆ encodePosition()
| void Knitter::encodePosition |
( |
| ) |
|
|
finalvirtual |
◆ getMachineType()
| Machine_t Knitter::getMachineType |
( |
| ) |
|
|
finalvirtual |
◆ getStartOffset()
| uint8_t Knitter::getStartOffset |
( |
const Direction_t |
direction | ) |
|
|
finalvirtual |
Get start offset.
- Returns
- Start offset, or 0 if unobtainable.
Implements KnitterInterface.
◆ indState()
| void Knitter::indState |
( |
Err_t |
error = ErrorCode::success | ) |
|
|
finalvirtual |
Send indState message.
- Parameters
-
| error | Error state (0 = success, other values = error). |
Implements KnitterInterface.
◆ init()
◆ initMachine()
| Err_t Knitter::initMachine |
( |
Machine_t |
machineType | ) |
|
|
finalvirtual |
◆ isr()
Interrupt service routine.
Update machine state data. Must execute as fast as possible. Machine type assumed valid.
Implements KnitterInterface.
◆ isReady()
| bool Knitter::isReady |
( |
| ) |
|
|
finalvirtual |
Assess whether the Finite State Machine is ready to move from state OpState::init to OpState::ready.
- Returns
true if ready to move from state OpState::init to OpState::ready, false otherwise.
Implements KnitterInterface.
References indState().
◆ knit()
◆ reqLine()
| void Knitter::reqLine |
( |
uint8_t |
lineNumber | ) |
|
|
private |
Send reqLine message.
- Parameters
-
| lineNumber | Line number requested. |
◆ setLastLine()
| void Knitter::setLastLine |
( |
| ) |
|
|
finalvirtual |
Get value of last line flag.
- Parameters
-
| `true` | if current line is the last line in the pattern, false otherwise. |
Implements KnitterInterface.
◆ setMachineType()
| void Knitter::setMachineType |
( |
Machine_t |
machineType | ) |
|
|
finalvirtual |
◆ setNextLine()
| bool Knitter::setNextLine |
( |
uint8_t |
lineNumber | ) |
|
|
finalvirtual |
Set line number of next row to be knitted.
- Parameters
-
| lineNumber | Line number (0-indexed and modulo 256). |
- Returns
true if successful, false otherwise.
Implements KnitterInterface.
References reqLine().
◆ setUpInterrupt()
| void Knitter::setUpInterrupt |
( |
| ) |
|
|
finalvirtual |
◆ startKnitting()
| Err_t Knitter::startKnitting |
( |
uint8_t |
startNeedle, |
|
|
uint8_t |
stopNeedle, |
|
|
uint8_t * |
pattern_start, |
|
|
bool |
continuousReportingEnabled |
|
) |
| |
|
finalvirtual |
Enter OpState::knit machine state.
- Parameters
-
| startNeedle | Position of first needle in the pattern. |
| stopNeedle | Position of last needle in the pattern. |
| patternStart | Pointer to buffer containing pattern data. |
| continuousReportingEnabled | Flag variable indicating whether the device continuously reports its status to the host. |
- Returns
- Error code (0 = success, other values = error).
Implements KnitterInterface.
The documentation for this class was generated from the following files: