Trace restrict: Bump size of item type field

Reserve value for TRIT_REVERSE
tracerestrict-sx
Jonathan G Rennison 6 years ago
parent bd6f7b29fc
commit cae0b21534

@ -45,7 +45,7 @@ std::vector<uint32> _sl_xv_discardable_chunk_ids; ///< list of chunks
static const uint32 _sl_xv_slxi_chunk_version = 0; ///< current version os SLXI chunk
const SlxiSubChunkInfo _sl_xv_sub_chunk_infos[] = {
{ XSLFI_TRACE_RESTRICT, XSCF_NULL, 9, 9, "tracerestrict", NULL, NULL, "TRRM,TRRP,TRRS" },
{ XSLFI_TRACE_RESTRICT, XSCF_NULL, 10, 10, "tracerestrict", NULL, NULL, "TRRM,TRRP,TRRS" },
{ XSLFI_NULL, XSCF_NULL, 0, 0, NULL, NULL, NULL, NULL },// This is the end marker
};

@ -86,10 +86,10 @@ typedef uint32 TraceRestrictItem;
* OFFSET values describe the field bit offset
*/
enum TraceRestrictItemFlagAllocation {
TRIFA_TYPE_COUNT = 5,
TRIFA_TYPE_COUNT = 6,
TRIFA_TYPE_OFFSET = 0,
/* 3 bits reserved for future use */
/* 2 bits reserved for future use */
TRIFA_COND_FLAGS_COUNT = 3,
TRIFA_COND_FLAGS_OFFSET = 8,
@ -136,7 +136,11 @@ enum TraceRestrictItemType {
TRIT_COND_TRAIN_IN_SLOT = 21, ///< Test train slot membership
TRIT_COND_SLOT_OCCUPANCY = 22, ///< Test train slot occupancy state
//TRIT_COND_TRAIN_OWNER = 24, ///< Test train owner: reserved for future use
/* space up to 31 */
TRIT_COND_END = 48, ///< End (exclusive) of conditional item types, note that this has the same value as TRIT_REVERSE
//TRIT_REVERSE = 48, ///< Reverse: reserved for future use
/* space up to 63 */
};
/**
@ -468,7 +472,7 @@ static inline void SetTraceRestrictValue(TraceRestrictItem &item, uint16 value)
/** Is TraceRestrictItemType a conditional type? */
static inline bool IsTraceRestrictTypeConditional(TraceRestrictItemType type)
{
return type >= TRIT_COND_BEGIN;
return type >= TRIT_COND_BEGIN && type < TRIT_COND_END;
}
/** Is TraceRestrictItem type field a conditional type? */

Loading…
Cancel
Save