Classes | |
struct | plcData |
Macros | |
#define | ANALOG_BUF_SIZE 8 |
#define | ARRAY_SIZE(x) (sizeof((x)) / sizeof((x)[0])) |
#define | DIGITAL_BUF_SIZE 16 |
#define | PORT 6668 |
Functions | |
int | createUDPSocket (int port) |
void * | exchangeData (void *arg) |
void | finalizeHardware () |
Resource clearing. More... | |
void | initializeHardware () |
Initialization procedures. More... | |
void | sleep_ms (int milliseconds) |
void | updateBuffersIn () |
Update internal buffers. More... | |
void | updateBuffersOut () |
Update output buffers. More... | |
#define ANALOG_BUF_SIZE 8 |
Definition at line 48 of file simulink.cpp.
#define ARRAY_SIZE | ( | x | ) | (sizeof((x)) / sizeof((x)[0])) |
Definition at line 43 of file simulink.cpp.
#define DIGITAL_BUF_SIZE 16 |
Definition at line 49 of file simulink.cpp.
#define PORT 6668 |
Definition at line 46 of file simulink.cpp.
int createUDPSocket | ( | int | port | ) |
Definition at line 75 of file simulink.cpp.
void* exchangeData | ( | void * | arg | ) |
Definition at line 111 of file simulink.cpp.
void finalizeHardware | ( | ) |
Resource clearing.
This function is called by the main OpenPLC routine when it is finalizing. Resource clearing procedures should be here.
Definition at line 176 of file simulink.cpp.
void initializeHardware | ( | ) |
Initialization procedures.
This function is called by the main OpenPLC routine when it is initializing. Hardware initialization procedures should be here.
Definition at line 166 of file simulink.cpp.
void sleep_ms | ( | int | milliseconds | ) |
Definition at line 63 of file simulink.cpp.
void updateBuffersIn | ( | ) |
Update internal buffers.
This function is called by the OpenPLC in a loop. Here the internal buffers must be updated to reflect the actual Input state. The mutex bufferLock must be used to protect access to the buffers on a threaded environment.
Definition at line 185 of file simulink.cpp.
void updateBuffersOut | ( | ) |
Update output buffers.
This function is called by the OpenPLC in a loop. Here the internal buffers must be updated to reflect the actual Output state. The mutex bufferLock must be used to protect access to the buffers on a threaded environment.
Definition at line 197 of file simulink.cpp.