The Assimilation Project  based on Assimilation version
Go to the documentation of this file.
27 #ifndef _FRAME_H
28 #define _FRAME_H
29 #include <projectcommon.h>
30 #include <assimobj.h>
31 #include <generic_tlv_min.h>
32 typedef struct _FrameSet FrameSet;
33 typedef struct _Frame Frame;
43 struct _Frame {
45  guint16 type;
46  guint32 length;
47  gpointer value;
48  gsize (*dataspace)(const Frame* self);
49  void (*updatedata)(Frame* self, gpointer tlvptr, gconstpointer pktend, FrameSet* fs);
50  gboolean (*isvalid)(const Frame* self, gconstpointer tlvptr, gconstpointer pktend);
52  void (*setvalue)(Frame* self,
53  gpointer value,
54  guint32 length,
55  GDestroyNotify valfinal);
56  void (*dump)(const Frame* self, const char * prefix);
57  GDestroyNotify valuefinalize;
58 };
60 WINEXPORT Frame* frame_new(guint16 frame_type, gsize framesize);
61 WINEXPORT Frame* frame_tlvconstructor(gpointer tlvstart, gconstpointer pktend, gpointer*,gpointer*);
65 #endif /* _FRAME_H */
guint32 length
Frame Length.
Definition: frame.h:46
GDestroyNotify valuefinalize
method for finalizing value
Definition: frame.h:57
AssimObj baseclass
Base object class for our Class system.
Definition: frame.h:44
This is the base Frame class object (in-memory TLV (type, length, value)) for every general component...
Definition: frame.h:43
Definition: projectcommon.h:45
gpointer value
Frame Value (pointer)
Definition: frame.h:47
WINEXPORT Frame * frame_tlvconstructor(gpointer tlvstart, gconstpointer pktend, gpointer *, gpointer *)
Given marshalled data corresponding to a Frame (basic binary frame), return that corresponding Frame ...
Definition: frame.c:158
void(* setvalue)(Frame *self, gpointer value, guint32 length, GDestroyNotify valfinal)
member function for setting value
Definition: frame.h:52
This file defines our base object class: AssimObj.
gsize(* dataspace)(const Frame *self)
How much space is needed to marshall this Frame?
Definition: frame.h:48
WINEXPORT Frame * frame_new(guint16 frame_type, gsize framesize)
Construct a new frame - allowing for "derived" frame types...
Definition: frame.c:125
Project common header file.
gboolean(* isvalid)(const Frame *self, gconstpointer tlvptr, gconstpointer pktend)
TRUE if TLV data looks valid...
Definition: frame.h:50
WINEXPORT void frame_default_valuefinalize(gpointer value)
Finalize a Frame.
Definition: frame.c:57
guint16 type
Frame Type (see Individual TLV &#39;Frame&#39; data types and layouts (by TLV type) - frameformats.h )
Definition: frame.h:45
Provides definitions for using our generic TLV capabilities.
void(* updatedata)(Frame *self, gpointer tlvptr, gconstpointer pktend, FrameSet *fs)
Update packet data.
Definition: frame.h:49
FrameSet class - used for collecting Frames when not on the wire, and for marshalling/demarshalling t...
Definition: frameset.h:46
void(* dump)(const Frame *self, const char *prefix)
member function for dumping Frame
Definition: frame.h:56