Spacecraft Control Framework 1.0
Spacecraft Control Library
sc_ccsds_data.h
Go to the documentation of this file.
1//-----------------------------------------------------------------------------------------
2// CCSDS_DATA header.
3//-----------------------------------------------------------------------------------------
4// Copyright (c) 2016 Princeton Satellite Systems. All rights reserved.
5//-----------------------------------------------------------------------------------------
6
7#ifndef __CCSDS_DATA__
8#define __CCSDS_DATA__
9
10#include <matrixlib/matrixlib.h>
11
12
15
16
23enum{ none, telem_int8, telem_int16, telem_int32, telem_float, telem_double, telem_boolean };
24
26{
27
28 public:
30 ccsds_data( void );
31
33 ~ccsds_data( void );
34
36 int get_type( void ){return type;};
37
39 void set_type( int type ){this->type = type;};
40
43
45 void set_location_in_frame( int location ){location_in_frame = location;};
46
48 void deallocate_memory (int type );
49
51 double get_double( void ){ return *data_double;};
52 float get_float( void ){ return *data_float;};
53 int8_t get_int8( void ){ return *data_int8;};
54 int16_t get_int16( void ){ return *data_int16;};
55 int32_t get_int32( void ){ return *data_int32;};
56 bool get_boolean( void ){ return *data_boolean;};
57
58
59 void set_double( double new_data );
60 void set_float( float new_data );
61 void set_int8( int8_t new_data );
62 void set_int16( int16_t new_data );
63 void set_int32( int32_t new_data );
64 void set_boolean( bool new_data );
65
66
67 protected:
69 int type;
75 double *data_double;
76 float *data_float;
77 int32_t *data_int32;
78 int16_t *data_int16;
79 int8_t *data_int8;
80 bool *data_boolean;
81
82};
83
84#endif
Definition: sc_ccsds_data.h:26
~ccsds_data(void)
Destructor.
Definition: sc_ccsds_data.cc:19
int type
Type of data.
Definition: sc_ccsds_data.h:69
int location_in_frame
Location of data in the frame.
Definition: sc_ccsds_data.h:71
int number_of_octets
Number of octets.
Definition: sc_ccsds_data.h:73
double get_double(void)
Get value of the data.
Definition: sc_ccsds_data.h:51
void deallocate_memory(int type)
Deallocate memory.
Definition: sc_ccsds_data.cc:24
int get_location_in_frame(void)
Get the location in the CCSDS frame.
Definition: sc_ccsds_data.h:42
int get_type(void)
Get the data type.
Definition: sc_ccsds_data.h:36
void set_type(int type)
Set the data type.
Definition: sc_ccsds_data.h:39
double * data_double
Storage for the data.
Definition: sc_ccsds_data.h:75
void set_location_in_frame(int location)
Set the location in the CCSDS frame.
Definition: sc_ccsds_data.h:45
ccsds_data(void)
Constructor.
Definition: sc_ccsds_data.cc:14