#include <DCFmpacketBase.h>
Inheritance diagram for DCFmpacketBase:


Public Member Functions | |
| int | bplen_n () |
| void | bplen_n (const int) |
| int | bplen_sizeb () |
| void | bplen_sizeb (const int) |
| virtual void | clear () |
| DCFmpacketBase (const int sizebmax=0, const int bplen_sizeb=1, const int bplen_n=1) | |
| bool | empty () |
| int | m (const char) |
| int | m () |
| char | mcode () |
| char * | mpacket () |
| int | n () |
| int | order (const char) |
| int | order () |
| virtual void | put (bytepack &) |
| virtual void | put (const char) |
| virtual void | reset () |
| int | rs (const char) |
| int | rs () |
| virtual void | set (const char, const int) |
| virtual void | set (const char) |
| virtual void | setencode (const int, const int, const int) |
| int | sizeb () |
| int | sw (const char) |
| int | sw () |
| ~DCFmpacketBase () | |
Protected Attributes | |
| int | _bplen_n |
| int | _bplen_sizeb |
| char | _mcode |
| int | _n |
| char * | _ptmpacket |
| int | _sizeb |
| int | _sizebmax |
Friends | |
| ostream & | operator<< (ostream &, DCFmpacketBase &) |
| istream & | operator>> (istream &, DCFmpacketBase &) |
|
||||||||||||||||
|
Definition at line 70 of file DCFmpacketBase.h. References _ptmpacket, and _sizebmax.
00074 : _sizebmax(sizebmax), _sizeb(0), _mcode(0), _n(-1), 00075 _bplen_sizeb(bplen_sizeb), _bplen_n(bplen_n) 00076 { 00077 _ptmpacket = new char[ _sizebmax ]; 00078 }; |
|
|
Definition at line 81 of file DCFmpacketBase.h. References _ptmpacket.
00082 {
00083 if ( _ptmpacket ) { delete [] _ptmpacket; _ptmpacket = 0; }
00084 };
|
|
|
Definition at line 186 of file DCFmpacketBase.h. References _bplen_n. Referenced by setencode().
00186 { return _bplen_n; };
|
|
|
Definition at line 183 of file DCFmpacketBase.h. References _bplen_n.
00183 { _bplen_n = bplen_n; };
|
|
|
Definition at line 180 of file DCFmpacketBase.h. References _bplen_sizeb. Referenced by setencode().
00180 { return _bplen_sizeb; };
|
|
|
Definition at line 174 of file DCFmpacketBase.h. References _bplen_sizeb.
00175 {
00176 _bplen_sizeb = bplen_sizeb;
00177 };
|
|
|
Definition at line 98 of file DCFmpacketBase.h. References reset(), and set(). Referenced by DCFsbifstream< Data_t >.findmpacket(), and operator>>().
|
|
|
Definition at line 195 of file DCFmpacketBase.h. References _sizeb. Referenced by DCFsbifstream< Data_t >.findmpacket(), operator<<(), and operator>>().
00195 { return ( _sizeb == 0 ); }
|
|
|
Definition at line 123 of file DCFmpacketBase.h.
00124 {
00125 return int( (unsigned char)( 0x1F & mcode ) );
00126 };
|
|
|
Definition at line 129 of file DCFmpacketBase.h. References _mcode.
00130 {
00131 return int( (unsigned char)( 0x1F & _mcode ) );
00132 };
|
|
|
Definition at line 120 of file DCFmpacketBase.h. References _mcode.
00120 { return _mcode; };
|
|
|
Definition at line 192 of file DCFmpacketBase.h. References _ptmpacket.
00192 { return _ptmpacket; }
|
|
|
Definition at line 171 of file DCFmpacketBase.h. References _n.
00171 { return _n; };
|
|
|
Definition at line 159 of file DCFmpacketBase.h.
00160 {
00161 return int( (unsigned char)( ( 0x20 & mcode ) >> 5 ) );
00162 };
|
|
|
Definition at line 165 of file DCFmpacketBase.h. References _mcode.
00166 {
00167 return int( (unsigned char)( ( 0x20 & _mcode ) >> 5 ) );
00168 };
|
|
|
Definition at line 16 of file DCFmpacketBase.cpp. References _ptmpacket, _sizeb, and bytepack.size().
00017 {
00018 for( int i = 0; i < bp.size(); i++ ) { _ptmpacket[ _sizeb++ ] = bp[i]; }
00019 };
|
|
|
Definition at line 189 of file DCFmpacketBase.h. References _ptmpacket, and _sizeb.
00189 { _ptmpacket[ _sizeb++ ] = c; };
|
|
|
Definition at line 104 of file DCFmpacketBase.h. References _sizeb. Referenced by clear().
00104 { _sizeb=0; };
|
|
|
Definition at line 147 of file DCFmpacketBase.h.
00148 {
00149 return ( ( 0x40 & mcode ) >> 6 );
00150 };
|
|
|
Definition at line 153 of file DCFmpacketBase.h. References _mcode.
00154 {
00155 return int( (unsigned char)( ( 0x40 & _mcode ) >> 6 ) );
00156 };
|
|
||||||||||||
|
Definition at line 110 of file DCFmpacketBase.h.
|
|
|
Definition at line 107 of file DCFmpacketBase.h. References _mcode. Referenced by clear(), and set().
00107 { _mcode=mcode; }
|
|
||||||||||||||||
|
|
Definition at line 117 of file DCFmpacketBase.h. References _sizeb.
00117 { return _sizeb; };
|
|
|
Definition at line 135 of file DCFmpacketBase.h.
00136 {
00137 return int( (unsigned char)( ( 0x80 & mcode ) >> 7 ) );
00138 };
|
|
|
Definition at line 141 of file DCFmpacketBase.h. References _mcode.
00142 {
00143 return int( (unsigned char)( ( 0x80 & _mcode ) >> 7 ) );
00144 };
|
|
||||||||||||
|
Definition at line 21 of file DCFmpacketBase.cpp.
00022 {
00023 bytepack bp;
00024 if ( !mp.empty() && os.good() ) {
00025 os << bp( mp._sizeb, mp._bplen_sizeb );
00026 os << bp( mp._mcode, 1 );
00027 os << bp( mp._n, mp._bplen_n );
00028
00029 if ( mp._sizeb ) {
00030 for( int i = 0; i < mp._sizeb; i++ ) {
00031 os.put( mp._ptmpacket[i] );
00032 }
00033 }
00034
00035 os << bp(mp._sizeb,mp._bplen_sizeb);
00036 }
00037 return os;
00038 };
|
|
||||||||||||
|
Definition at line 40 of file DCFmpacketBase.cpp.
00041 {
00042 int itmp;
00043 bytepack bp;
00044 mp.clear();
00045 if ( is.good() ) {
00046 is >> bp( 0, mp._bplen_sizeb ); mp._sizeb = bp;
00047 if ( !mp.empty() ) {
00048 is >> bp(0,1); mp._mcode = char(bp);
00049 is >> bp(0,mp._bplen_n); mp._n = int(bp);
00050 if (mp._sizeb) for( int i = 0; i < mp._sizeb; i++ ) {
00051 is.get( mp._ptmpacket[i] );
00052 }
00053 is >> bp( 0, mp._bplen_sizeb ); itmp = int(bp);
00054 if ( itmp != mp._sizeb ) {
00055 cout << mp._bplen_sizeb << " ERROR !=sizeb\n";
00056 }
00057 }
00058 }
00059 return is;
00060 };
|
|
|
Definition at line 57 of file DCFmpacketBase.h. Referenced by bplen_n(), operator<<(), and operator>>(). |
|
|
Definition at line 56 of file DCFmpacketBase.h. Referenced by bplen_sizeb(), operator<<(), and operator>>(). |
|
|
Definition at line 53 of file DCFmpacketBase.h. Referenced by m(), mcode(), operator<<(), operator>>(), order(), rs(), set(), and sw(). |
|
|
Definition at line 54 of file DCFmpacketBase.h. Referenced by n(), operator<<(), operator>>(), and set(). |
|
|
Definition at line 59 of file DCFmpacketBase.h. Referenced by DCFmpacketBase(), mpacket(), operator<<(), operator>>(), put(), setencode(), and ~DCFmpacketBase(). |
|
|
Definition at line 52 of file DCFmpacketBase.h. Referenced by empty(), operator<<(), operator>>(), put(), reset(), and sizeb(). |
|
|
Definition at line 51 of file DCFmpacketBase.h. Referenced by DCFmpacketBase(). |
1.3.6