mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
moved opal code
git-svn-id: https://zerberus.eonerc.rwth-aachen.de:8443/svn/s2ss/trunk@150 8ec27952-4edc-4aab-86aa-e87bb2611832
This commit is contained in:
parent
e9c99e0d44
commit
1a87f92af3
9 changed files with 9 additions and 7 deletions
|
@ -20,6 +20,14 @@
|
|||
#define MSG_TYPE_START 1
|
||||
#define MSG_TYPE_STOP 2
|
||||
|
||||
/** Initialize a message */
|
||||
#define MSG_INIT(i) { \
|
||||
.version = MSG_VERSION, \
|
||||
.type = MSG_TYPE_DATA, \
|
||||
.length = i, \
|
||||
.sequence = 0 \
|
||||
}
|
||||
|
||||
/** This message format is used by all clients
|
||||
*
|
||||
* @diafile msg_format.dia
|
|
@ -66,19 +66,13 @@ static void *SendToIPPort(void *arg)
|
|||
double mdldata[MAXSENDSIZE];
|
||||
int mdldata_size;
|
||||
|
||||
struct msg msg;
|
||||
struct msg msg = MSG_INIT(0);
|
||||
int msg_size;
|
||||
|
||||
OpalPrint("%s: SendToIPPort thread started\n", PROGNAME);
|
||||
|
||||
OpalGetNbAsyncSendIcon(&nbSend);
|
||||
if (nbSend >= 1) {
|
||||
|
||||
/* Prepare message header */
|
||||
msg.version = MSG_VERSION;
|
||||
msg.type = MSG_TYPE_DATA;
|
||||
msg.sequence = 0;
|
||||
|
||||
do {
|
||||
/* This call unblocks when the 'Data Ready' line of a send icon is asserted. */
|
||||
if ((n = OpalWaitForAsyncSendRequest(&SendID)) != EOK) {
|
Loading…
Add table
Reference in a new issue