|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Bit fields definition in CWF |
« View previous topic :: View next topic » |
Author |
Message
|
yaakovd |
Posted: Tue Dec 15, 2009 1:33 am Post subject: Bit fields definition in CWF |
|
|
Partisan
Joined: 20 Jan 2003 Posts: 319 Location: Israel
|
Known defect T23384: Bit fields within a C structure are imported but the CWF Length Count, Leading Skip Count, Trailing Skip Count, and Byte Alignment property values might not be set properly and should be reviewed.
What is correct way to define bit fields in structure
Code: |
struct indicators //OFS Description
{
unsigned char opt_return_ticket :1; //56 Return ticket
unsigned char opt_training_mode :1; //56 Training mode ticket
unsigned char opt_pc_generated :1; //56 Record generated by MFS/LFS
unsigned char opt_pos_offline :1; //56 POS was offline
unsigned char opt_void_ticket :1; //56 Ticket was voided
unsigned char opt_bad_record :1; //56 Ignore record
unsigned char opt_store_count :1; //56 Store stock count TRS (Tesco)
unsigned char opt_wastage_mode :1; //56 Tesco
}; |
which after import not set properly?
e.g. hex-value "A4" to be interpreted as bits: "10100100 and" parsed as fields above. _________________ Best regards.
Yaakov
SWG, IBM Commerce, Israel |
|
Back to top |
|
 |
kimbert |
Posted: Tue Dec 15, 2009 2:26 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
The MRM parser does not support bit fields.
This:
Quote: |
Bit fields within a C structure are imported |
...is only saying that the bit field will be imported, not that it is imported as a bit field. I'm not claiming that the wording is good, just trying to explain what's going on. I suspect that the bit field will appear in the message model as a byte value, and then you can do bit operations in ESQL to extract the individual bits. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|