memcpy(tx_array + 0, &(tx.status), sizeof(u16));
memcpy(tx_array + 2, &(tx.command), sizeof(u16));
memcpy(tx_array + 2, &(tx.address), sizeof(u16));
memcpy(tx_array + 4, &(tx.data), sizeof(u32));
memcpy(tx_array + 0, &(tx.status), sizeof(u16));
memcpy(tx_array + 2, &(tx.command), sizeof(u16));
memcpy(tx_array + 4, &(tx.address), sizeof(u16));
memcpy(tx_array + 6, &(tx.data), sizeof(u32));
The following also looks like it might be an error. You are passing a pointer to a float cast to u32*. Does your device really return a 32-bit float, or does it return an integer?
asynStatus PSController::readFloat64(asynUser* asyn, epicsFloat64* value)
{
float temp = (float) *value;
asynStatus status = performIO(asyn, (u32*) &temp);
*value = temp;
return status;
}
Neither of these problems is likely to cause the crash. Please run the program under gdb and send the output of "backtrace" when it crashes.