Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
45a2bdf
Added TV GUI side support for vectors
Pherring04 May 6, 2025
f100b94
Initial check-in for variable server to support vector.
hchen99 May 14, 2025
36d20b5
Merge branch 'master' into vs_vector
hchen99 Jul 14, 2025
34d0d57
Merge branch 'master' into Tv_Vector
hchen99 Aug 4, 2025
5b6cd51
Merge branch 'master' into vs_vector
hchen99 Aug 4, 2025
8def21c
Merge branch 'Tv_Vector' into vs_vector
hchen99 Aug 4, 2025
892ef13
Merge branch 'master' into vs_vector
hchen99 Aug 13, 2025
aa6f367
Merge branch 'master' into vs_vector
hchen99 Oct 14, 2025
d00ef4f
Merge branch 'master' into vs_vector
hchen99 Oct 15, 2025
c693979
Added accessor functions to ATTRIBUTES to get stl container size and …
hchen99 Nov 8, 2025
ac2977e
Added support to deque and array as they be treated similar to vector.
hchen99 Nov 11, 2025
f86d93a
Merge branch 'master' into vs_vector
hchen99 Nov 11, 2025
9bef73d
Updated the test due to vs vector support change.
hchen99 Nov 11, 2025
480922f
Added vector/deque/array of TRICK_STRUCTURED data type support.
hchen99 Nov 14, 2025
51752cf
Merge branch 'master' into vs_vector
hchen99 Nov 19, 2025
159bfbe
Updated to support vector<bool>.
hchen99 Dec 1, 2025
72ee8a4
Updated to support vector/deque/array of *.
hchen99 Dec 2, 2025
c94873e
Updated to support vector/deque/array of TRICK_ENUMERATED and display…
hchen99 Dec 2, 2025
7587cd1
Made elements of vector/array/deque to be editable from TV.
hchen99 Dec 4, 2025
1392502
Not to change the stl type to element when not indexing.
hchen99 Dec 4, 2025
a986fd3
Added special handling for updating vector of bool since std::vector<…
hchen99 Dec 5, 2025
f588c96
Need to print NULL for the newly added ATTRIBUTES assessor function f…
hchen99 Dec 5, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions include/trick/VariableReference.hh
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ namespace Trick {
bool _deref; // -- indicates whether variable is pointer that needs to be dereferenced
cv_converter * _conversion_factor ; // ** udunits conversion factor
TRICK_TYPE _trick_type ; // -- Trick type of this variable
bool _used_stl_indexing; // -- indicates if reference involved STL container indexing

bool _staged;
bool _write_ready;
Expand Down
9 changes: 9 additions & 0 deletions include/trick/attributes.h
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,19 @@ typedef struct ATTRIBUTES_tag {
INDEX index[TRICK_MAX_INDEX]; /**< -- An array of array-index information or bit-field information.
Is only meaningful if num_index > 0 or if type is a bit field type. */

TRICK_STL_TYPE stl_type; /**< -- STL type if this is an STL container */
TRICK_TYPE stl_elem_type; /**< -- Element type of STL container
TRICK data type */
const char * stl_elem_type_name; /**< -- Element type name of STL container
Character string representation of the C/C++ data type or user-defined type. */

void (*checkpoint_stl)(void * start_address, const char * obj_name , const char * var_name) ;
void (*post_checkpoint_stl)(void * start_address, const char * obj_name , const char * var_name) ;
void (*restore_stl)(void * start_address, const char * obj_name , const char * var_name) ;
void (*clear_stl)(void * start_address) ;
size_t (*get_stl_size)(void * start_address) ; /**< ** Function to get STL container size */
void* (*get_stl_element)(void * start_address, size_t index) ; /**< ** Function to get pointer to STL element at index */
void (*set_stl_element)(void * start_address, size_t index, void* value_ptr) ; /**< ** Function to set STL element at index (for vector<bool> write-back) */

} ATTRIBUTES;

Expand Down
18 changes: 18 additions & 0 deletions include/trick/parameter_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,23 @@
extern "C" {
#endif

/**
* The TRICK_STL_CONTAINER_TYPE enumeration represents the Trick STL types.
*/
typedef enum {
TRICK_STL_VECTOR = 0, /* STL vector */
TRICK_STL_ARRAY = 1, /* STL array */
TRICK_STL_LIST = 2, /* STL list */
TRICK_STL_DEQUE = 3, /* STL deque */
TRICK_STL_SET = 4, /* STL set */
TRICK_STL_MAP = 5, /* STL map */
TRICK_STL_PAIR = 6, /* STL pair */
TRICK_STL_QUEUE = 7, /* STL queue */
TRICK_STL_STACK = 8, /* STL stack */
TRICK_STL_PRIORITY_QUEUE = 9, /* STL priority_queue */
TRICK_STL_UNKNOWN
} TRICK_STL_TYPE ;

/**
* The TRICK_TYPE enumeration represents the Trick data types.
*/
Expand Down Expand Up @@ -43,6 +60,7 @@ extern "C" {
} TRICK_TYPE ;

const char* trickTypeCharString( TRICK_TYPE type, const char* name);
const char* trickSTLTypeCharString( TRICK_STL_TYPE type);

/* here for backwards compatibility */
#define TRICK_USER_DEFINED_TYPE TRICK_OPAQUE_TYPE
Expand Down
Loading
Loading