18 #ifndef FS_READWRITEREQ_H
19 #define FS_READWRITEREQ_H
21 #include "SignalData.hpp"
56 friend bool printFSREADWRITEREQ(FILE * output,
const Uint32 * theData, Uint32 len, Uint16 receiverBlockNo);
63 fsFormatListOfPairs=0,
64 fsFormatArrayOfPages=1,
65 fsFormatListOfMemPages=2,
108 static Uint8 getSyncFlag(
const UintR & opFlag);
109 static void setSyncFlag(UintR & opFlag, Uint8 flag);
112 static void setFormatFlag(UintR & opFlag, Uint8 flag);
114 static Uint32 getPartialReadFlag(UintR opFlag);
115 static void setPartialReadFlag(UintR & opFlag, Uint32 flag);
129 #define SYNC_SHIFT (4)
130 #define SYNC_MASK (0x01)
132 #define FORMAT_MASK (0x0F)
134 #define PARTIAL_READ_SHIFT (5)
138 FsReadWriteReq::getSyncFlag(
const UintR & opFlag){
139 return (Uint8)((opFlag >> SYNC_SHIFT) & SYNC_MASK);
144 FsReadWriteReq::getFormatFlag(
const UintR & opFlag){
150 FsReadWriteReq::setSyncFlag(UintR & opFlag, Uint8 flag){
151 ASSERT_BOOL(flag,
"FsReadWriteReq::setSyncFlag");
152 opFlag |= (flag << SYNC_SHIFT);
157 FsReadWriteReq::setFormatFlag(UintR & opFlag, Uint8 flag){
158 ASSERT_MAX(flag, fsFormatMax,
"FsReadWriteReq::setSyncFlag");
164 FsReadWriteReq::setPartialReadFlag(UintR & opFlag, Uint32 flag){
165 ASSERT_BOOL(flag,
"FsReadWriteReq::setSyncFlag");
166 opFlag |= (flag << PARTIAL_READ_SHIFT);
171 FsReadWriteReq::getPartialReadFlag(UintR opFlag){
172 return (opFlag >> PARTIAL_READ_SHIFT) & 1;
180 STATIC_CONST(SignalLength = 2);