AYAB Arduino Firmware 0.95
The goal of the AYAB project is to provide an alternative way to control the famous Brother KH-9xx range of knitting machines using a computer
Tester Class Reference
Inheritance diagram for Tester:
Inheritance graph
Collaboration diagram for Tester:
Collaboration graph

Public Member Functions

Err_t startTest (Machine_t machineType) final
 Start hardware test.
 
void loop () final
 Main loop for hardware tests.
 
void helpCmd () final
 Help command handler.
 
void sendCmd () final
 Send command handler.
 
void beepCmd () final
 Beep command handler.
 
void setSingleCmd (const uint8_t *buffer, size_t size) final
 Set single solenoid command handler.
 
void setAllCmd (const uint8_t *buffer, size_t size) final
 Set all solenoids command handler.
 
void readEOLsensorsCmd () final
 Read EOL sensors command handler.
 
void readEncodersCmd () final
 Read encoders command handler.
 
void autoReadCmd () final
 Auto read command handler.
 
void autoTestCmd () final
 Auto test command handler.
 
void stopCmd () final
 Stop command handler.
 
void quitCmd () final
 Quit command handler.
 
void encoderChange () final
 Interrupt service routine for encoder A.
 

Private Member Functions

void setUp ()
 Setup for hardware tests.
 
void beep () const
 Make a beep.
 
void readEOLsensors ()
 Read the End of Line sensors.
 
void readEncoders () const
 Read the Hall sensors that determine which carriage is in use.
 
void autoRead ()
 Read both carriage sensors and End of Line sensors.
 
void autoTestEven () const
 Set even-numbered solenoids.
 
void autoTestOdd () const
 Set odd-numbered solenoids.
 
void handleTimerEvent ()
 Timer event every 500ms to handle auto functions.
 

Private Attributes

bool m_autoReadOn = false
 
bool m_autoTestOn = false
 
unsigned long m_lastTime = 0U
 
bool m_timerEventOdd = false
 
char buf [BUFFER_LEN] = {0}
 

Member Function Documentation

◆ autoReadCmd()

void Tester::autoReadCmd ( )
finalvirtual

Auto read command handler.

Implements TesterInterface.

◆ autoTestCmd()

void Tester::autoTestCmd ( )
finalvirtual

Auto test command handler.

Implements TesterInterface.

◆ beepCmd()

void Tester::beepCmd ( )
finalvirtual

Beep command handler.

Implements TesterInterface.

References beep().

Here is the call graph for this function:

◆ encoderChange()

void Tester::encoderChange ( )
finalvirtual

Interrupt service routine for encoder A.

Reimplemented from TesterInterface.

◆ helpCmd()

void Tester::helpCmd ( )
finalvirtual

Help command handler.

Implements TesterInterface.

Here is the caller graph for this function:

◆ loop()

void Tester::loop ( )
finalvirtual

Main loop for hardware tests.

Implements TesterInterface.

References handleTimerEvent().

Here is the call graph for this function:

◆ quitCmd()

void Tester::quitCmd ( )
finalvirtual

Quit command handler.

Implements TesterInterface.

◆ readEncodersCmd()

void Tester::readEncodersCmd ( )
finalvirtual

Read encoders command handler.

Implements TesterInterface.

References readEncoders().

Here is the call graph for this function:

◆ readEOLsensorsCmd()

void Tester::readEOLsensorsCmd ( )
finalvirtual

Read EOL sensors command handler.

Implements TesterInterface.

References readEOLsensors().

Here is the call graph for this function:

◆ sendCmd()

void Tester::sendCmd ( )
finalvirtual

Send command handler.

Implements TesterInterface.

◆ setAllCmd()

void Tester::setAllCmd ( const uint8_t *  buffer,
size_t  size 
)
finalvirtual

Set all solenoids command handler.

Parameters
bufferPointer to a data buffer.
sizeNumber of bytes of data in the buffer.

Implements TesterInterface.

◆ setSingleCmd()

void Tester::setSingleCmd ( const uint8_t *  buffer,
size_t  size 
)
finalvirtual

Set single solenoid command handler.

Parameters
bufferPointer to a data buffer.
sizeNumber of bytes of data in the buffer.

Implements TesterInterface.

◆ startTest()

Err_t Tester::startTest ( Machine_t  machineType)
finalvirtual

Start hardware test.

Parameters
machineTypeMachine type.
Returns
Error code (0 = success, other values = error).

Implements TesterInterface.

References setUp().

Here is the call graph for this function:

◆ stopCmd()

void Tester::stopCmd ( )
finalvirtual

Stop command handler.

Implements TesterInterface.


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