mirror of
https://github.com/nasa/trick.git
synced 2024-12-22 14:32:24 +00:00
Add check and warning for unsupported types in data recording (#1441)
This commit is contained in:
parent
8be3e30f7a
commit
930dfbc683
@ -25,5 +25,7 @@ drg[DR_GROUP_ID].add_variable("drx.drt.k")
|
||||
drg[DR_GROUP_ID].add_variable("drx.drt.l")
|
||||
drg[DR_GROUP_ID].add_variable("drx.drt.m")
|
||||
drg[DR_GROUP_ID].add_variable("drx.drt.n")
|
||||
drg[DR_GROUP_ID].add_variable("drx.drt.o")
|
||||
drg[DR_GROUP_ID].add_variable("drx.drt.p")
|
||||
trick.add_data_record_group(drg[DR_GROUP_ID], trick.DR_Buffer)
|
||||
drg[DR_GROUP_ID].enable()
|
||||
|
@ -25,5 +25,7 @@ drg[DR_GROUP_ID].add_variable("drx.drt.k")
|
||||
drg[DR_GROUP_ID].add_variable("drx.drt.l")
|
||||
drg[DR_GROUP_ID].add_variable("drx.drt.m")
|
||||
drg[DR_GROUP_ID].add_variable("drx.drt.n")
|
||||
drg[DR_GROUP_ID].add_variable("drx.drt.o")
|
||||
drg[DR_GROUP_ID].add_variable("drx.drt.p")
|
||||
trick.add_data_record_group(drg[DR_GROUP_ID], trick.DR_Buffer)
|
||||
drg[DR_GROUP_ID].enable()
|
||||
|
@ -87,6 +87,8 @@ class DRTypes {
|
||||
unsigned long long l;
|
||||
bool m;
|
||||
NUM_DEFS n;
|
||||
char * o; // Should not actually be added
|
||||
std::string p; // Should not actually be added
|
||||
|
||||
UINT_BITS uintB;
|
||||
INT_BITS intB;
|
||||
|
@ -25,7 +25,8 @@ int DRTypes::init() {
|
||||
l = 12345678912345; //unsigned long
|
||||
m = false; //boolean
|
||||
n = THREE; //enumerated type
|
||||
|
||||
o = "3 May. Bistritz.—Left Munich at 8:35 P. M., on 1st May, arriving at Vienna early next morning; should have arrived at 6:46, but train was an hour late. Buda-Pesth seems a wonderful place, from the glimpse which I got of it from the train and the little I could walk through the streets. I feared to go very far from the station, as we had arrived late and would start as near the correct time as possible. The impression I had was that we were leaving the West and entering the East; the most western of splendid bridges over the Danube, which is here of noble width and depth, took us among the traditions of Turkish rule.";
|
||||
p = "We left in pretty good time, and came after nightfall to Klausenburgh. Here I stopped for the night at the Hotel Royale. I had for dinner, or rather supper, a chicken done up some way with red pepper, which was very good but thirsty. (Mem., get recipe for Mina.) I asked the waiter, and he said it was called “paprika hendl,” and that, as it was a national dish, I should be able to get it anywhere along the Carpathians. I found my smattering of German very useful here; indeed, I don't know how I should be able to get on without it.";
|
||||
|
||||
/*============================================================================
|
||||
Bitfields
|
||||
|
@ -380,7 +380,14 @@ int Trick::DataRecordGroup::init() {
|
||||
delete drb ;
|
||||
continue ;
|
||||
} else {
|
||||
drb->ref = ref2 ;
|
||||
if (ref2->attr->type == TRICK_STRING || ref2->attr->type == TRICK_STL || ref2->attr->type == TRICK_STRUCTURED || ref2->attr->num_index != 0) {
|
||||
message_publish(MSG_WARNING, "Cannot Data Record unsupported type variable %s.\n", drb->name.c_str()) ;
|
||||
rec_buffer.erase(rec_buffer.begin() + jj--) ;
|
||||
delete drb ;
|
||||
continue ;
|
||||
} else {
|
||||
drb->ref = ref2 ;
|
||||
}
|
||||
}
|
||||
}
|
||||
if ( drb->alias.compare("") ) {
|
||||
|
Loading…
Reference in New Issue
Block a user