Paparazzi UAS  v5.2.2_stable-0-gd6b9f29
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
pprzlog_transport.h File Reference

Building and Paparazzi frames with timestamp for data logger. More...

+ Include dependency graph for pprzlog_transport.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define STX_LOG   0x99
 
#define PprzLogTransportSizeOf(_dev, _payload)   (_payload)
 
#define PprzLogTransportCheckFreeSpace(_dev, _x)   TransportLink(_dev, CheckFreeSpace(_x))
 
#define PprzLogTransportPut1Byte(_dev, _x)   TransportLink(_dev, Transmit(_x))
 
#define PprzLogTransportSendMessage(_dev)   TransportLink(_dev, SendMessage())
 
#define PprzLogTransportHeader(_dev, payload_len)
 
#define PprzLogTransportTrailer(_dev)
 
#define PprzLogTransportPutUint8(_dev, _byte)
 
#define PprzLogTransportPutNamedUint8(_dev, _name, _byte)   PprzLogTransportPutUint8(_dev, _byte)
 
#define PprzLogTransportPut1ByteByAddr(_dev, _byte)
 
#define PprzLogTransportPut2ByteByAddr(_dev, _byte)
 
#define PprzLogTransportPut4ByteByAddr(_dev, _byte)
 
#define PprzLogTransportPutDoubleByAddr(_dev, _byte)
 
#define PprzLogTransportPutUint64ByAddr(_dev, _byte)
 
#define PprzLogTransportPutInt64ByAddr(_dev, _byte)
 
#define PprzLogTransportPutInt8ByAddr(_dev, _x)   PprzLogTransportPut1ByteByAddr(_dev, _x)
 
#define PprzLogTransportPutUint8ByAddr(_dev, _x)   PprzLogTransportPut1ByteByAddr(_dev, (const uint8_t*)_x)
 
#define PprzLogTransportPutInt16ByAddr(_dev, _x)   PprzLogTransportPut2ByteByAddr(_dev, (const uint8_t*)_x)
 
#define PprzLogTransportPutUint16ByAddr(_dev, _x)   PprzLogTransportPut2ByteByAddr(_dev, (const uint8_t*)_x)
 
#define PprzLogTransportPutInt32ByAddr(_dev, _x)   PprzLogTransportPut4ByteByAddr(_dev, (const uint8_t*)_x)
 
#define PprzLogTransportPutUint32ByAddr(_dev, _x)   PprzLogTransportPut4ByteByAddr(_dev, (const uint8_t*)_x)
 
#define PprzLogTransportPutFloatByAddr(_dev, _x)   PprzLogTransportPut4ByteByAddr(_dev, (const uint8_t*)_x)
 
#define PprzLogTransportPutCharByAddr(_dev, _x)   PprzLogTransportPut1ByteByAddr(_dev, (const uint8_t*)_x)
 
#define PprzLogTransportPutArray(_dev, _put, _n, _x)
 
#define PprzLogTransportPutInt8Array(_dev, _n, _x)   PprzLogTransportPutArray(_dev, PprzLogTransportPutInt8ByAddr, _n, _x)
 
#define PprzLogTransportPutUint8Array(_dev, _n, _x)   PprzLogTransportPutArray(_dev, PprzLogTransportPutUint8ByAddr, _n, _x)
 
#define PprzLogTransportPutCharArray(_dev, _n, _x)   PprzLogTransportPutArray(_dev, PprzLogTransportPutCharByAddr, _n, _x)
 
#define PprzLogTransportPutInt16Array(_dev, _n, _x)   PprzLogTransportPutArray(_dev, PprzLogTransportPutInt16ByAddr, _n, _x)
 
#define PprzLogTransportPutUint16Array(_dev, _n, _x)   PprzLogTransportPutArray(_dev, PprzLogTransportPutUint16ByAddr, _n, _x)
 
#define PprzLogTransportPutInt32Array(_dev, _n, _x)   PprzLogTransportPutArray(_dev, PprzLogTransportPutInt32ByAddr, _n, _x)
 
#define PprzLogTransportPutUint32Array(_dev, _n, _x)   PprzLogTransportPutArray(_dev, PprzLogTransportPutUint32ByAddr, _n, _x)
 
#define PprzLogTransportPutFloatArray(_dev, _n, _x)   PprzLogTransportPutArray(_dev, PprzLogTransportPutFloatByAddr, _n, _x)
 
#define PprzLogTransportPutInt64Array(_dev, _n, _x)   PprzLogTransportPutArray(_dev, PprzLogTransportPutInt64ByAddr, _n, _x)
 
#define PprzLogTransportPutUint64Array(_dev, _n, _x)   PprzLogTransportPutArray(_dev, PprzLogTransportPutUint64ByAddr, _n, _x)
 
#define PprzLogTransportPutDoubleArray(_dev, _n, _x)   PprzLogTransportPutArray(_dev, PprzLogTransportPutDoubleByAddr, _n, _x)
 
#define PprzLogTransportPutFixedArray(_dev, _put, _n, _x)
 
#define PprzLogTransportPutInt8FixedArray(_dev, _n, _x)   PprzLogTransportPutFixedArray(_dev, PprzLogTransportPutInt8ByAddr, _n, _x)
 
#define PprzLogTransportPutUint8FixedArray(_dev, _n, _x)   PprzLogTransportPutFixedArray(_dev, PprzLogTransportPutUint8ByAddr, _n, _x)
 
#define PprzLogTransportPutCharFixedArray(_dev, _n, _x)   PprzLogTransportPutFixedArray(_dev, PprzLogTransportPutCharByAddr, _n, _x)
 
#define PprzLogTransportPutInt16FixedArray(_dev, _n, _x)   PprzLogTransportPutFixedArray(_dev, PprzLogTransportPutInt16ByAddr, _n, _x)
 
#define PprzLogTransportPutUint16FixedArray(_dev, _n, _x)   PprzLogTransportPutFixedArray(_dev, PprzLogTransportPutUint16ByAddr, _n, _x)
 
#define PprzLogTransportPutInt32FixedArray(_dev, _n, _x)   PprzLogTransportPutFixedArray(_dev, PprzLogTransportPutInt32ByAddr, _n, _x)
 
#define PprzLogTransportPutUint32FixedArray(_dev, _n, _x)   PprzLogTransportPutFixedArray(_dev, PprzLogTransportPutUint32ByAddr, _n, _x)
 
#define PprzLogTransportPutFloatFixedArray(_dev, _n, _x)   PprzLogTransportPutFixedArray(_dev, PprzLogTransportPutFloatByAddr, _n, _x)
 
#define PprzLogTransportPutInt64FixedArray(_dev, _n, _x)   PprzLogTransportPutFixedArray(_dev, PprzLogTransportPutInt64ByAddr, _n, _x)
 
#define PprzLogTransportPutUint64FixedArray(_dev, _n, _x)   PprzLogTransportPutFixedArray(_dev, PprzLogTransportPutUint64ByAddr, _n, _x)
 
#define PprzLogTransportPutDoubleFixedArray(_dev, _n, _x)   PprzLogTransportPutFixedArray(_dev, PprzLogTransportPutDoubleByAddr, _n, _x)
 

Variables

uint8_t log_ck
 

Detailed Description

Building and Paparazzi frames with timestamp for data logger.

LOG-message: ABCDEFGHxxxxxxxI A PPRZ_STX (0x99) B LENGTH (H->H) C SOURCE (0=uart0, 1=uart1, 2=i2c0, ...) D TIMESTAMP_LSB (100 microsec raster) E TIMESTAMP F TIMESTAMP G TIMESTAMP_MSB H PPRZ_DATA 0 SENDER_ID 1 MSG_ID 2 MSG_PAYLOAD . DATA (messages.xml) I CHECKSUM (sum[B->H])

Definition in file pprzlog_transport.h.

Macro Definition Documentation

#define PprzLogTransportCheckFreeSpace (   _dev,
  _x 
)    TransportLink(_dev, CheckFreeSpace(_x))

Definition at line 56 of file pprzlog_transport.h.

#define PprzLogTransportHeader (   _dev,
  payload_len 
)
Value:
{ \
uint8_t msg_len = PprzLogTransportSizeOf(_dev, payload_len); \
log_ck = msg_len; \
}
#define PprzLogTransportSizeOf(_dev, _payload)
#define STX_LOG
#define PprzLogTransportPutUint8(_dev, _byte)
unsigned long uint32_t
Definition: types.h:18
#define PprzLogTransportPut4ByteByAddr(_dev, _byte)
unsigned char uint8_t
Definition: types.h:14
uint8_t log_ck
#define PprzLogTransportPut1Byte(_dev, _x)
static uint32_t get_sys_time_usec(void)
Get the time in microseconds since startup.
Definition: sys_time_arch.h:67

Definition at line 60 of file pprzlog_transport.h.

#define PprzLogTransportPut1Byte (   _dev,
  _x 
)    TransportLink(_dev, Transmit(_x))

Definition at line 57 of file pprzlog_transport.h.

#define PprzLogTransportPut1ByteByAddr (   _dev,
  _byte 
)
Value:
{ \
uint8_t _x = *(_byte); \
}
#define PprzLogTransportPutUint8(_dev, _byte)
unsigned char uint8_t
Definition: types.h:14

Definition at line 82 of file pprzlog_transport.h.

#define PprzLogTransportPut2ByteByAddr (   _dev,
  _byte 
)
Value:
{ \
PprzLogTransportPut1ByteByAddr(_dev, (const uint8_t*)_byte+1); \
}
#define PprzLogTransportPut1ByteByAddr(_dev, _byte)
unsigned char uint8_t
Definition: types.h:14

Definition at line 87 of file pprzlog_transport.h.

#define PprzLogTransportPut4ByteByAddr (   _dev,
  _byte 
)
Value:
{ \
PprzLogTransportPut2ByteByAddr(_dev, (const uint8_t*)_byte+2); \
}
unsigned char uint8_t
Definition: types.h:14
#define PprzLogTransportPut2ByteByAddr(_dev, _byte)

Definition at line 92 of file pprzlog_transport.h.

#define PprzLogTransportPutArray (   _dev,
  _put,
  _n,
  _x 
)
Value:
{ \
for(_i = 0; _i < _n; _i++) { \
_put(_dev, &_x[_i]); \
} \
}
#define PprzLogTransportPutUint8(_dev, _byte)
unsigned char uint8_t
Definition: types.h:14

Definition at line 135 of file pprzlog_transport.h.

#define PprzLogTransportPutCharArray (   _dev,
  _n,
  _x 
)    PprzLogTransportPutArray(_dev, PprzLogTransportPutCharByAddr, _n, _x)

Definition at line 146 of file pprzlog_transport.h.

#define PprzLogTransportPutCharByAddr (   _dev,
  _x 
)    PprzLogTransportPut1ByteByAddr(_dev, (const uint8_t*)_x)

Definition at line 133 of file pprzlog_transport.h.

#define PprzLogTransportPutCharFixedArray (   _dev,
  _n,
  _x 
)    PprzLogTransportPutFixedArray(_dev, PprzLogTransportPutCharByAddr, _n, _x)

Definition at line 171 of file pprzlog_transport.h.

#define PprzLogTransportPutDoubleArray (   _dev,
  _n,
  _x 
)    PprzLogTransportPutArray(_dev, PprzLogTransportPutDoubleByAddr, _n, _x)

Definition at line 159 of file pprzlog_transport.h.

#define PprzLogTransportPutDoubleByAddr (   _dev,
  _byte 
)
Value:
{ \
PprzLogTransportPut4ByteByAddr(_dev, (const uint8_t*)_byte+4); \
}
#define PprzLogTransportPut4ByteByAddr(_dev, _byte)
unsigned char uint8_t
Definition: types.h:14

Definition at line 111 of file pprzlog_transport.h.

#define PprzLogTransportPutDoubleFixedArray (   _dev,
  _n,
  _x 
)    PprzLogTransportPutFixedArray(_dev, PprzLogTransportPutDoubleByAddr, _n, _x)

Definition at line 184 of file pprzlog_transport.h.

#define PprzLogTransportPutFixedArray (   _dev,
  _put,
  _n,
  _x 
)
Value:
{ \
uint8_t _i; \
for(_i = 0; _i < _n; _i++) { \
_put(_dev, &_x[_i]); \
} \
}
unsigned char uint8_t
Definition: types.h:14

Definition at line 161 of file pprzlog_transport.h.

#define PprzLogTransportPutFloatArray (   _dev,
  _n,
  _x 
)    PprzLogTransportPutArray(_dev, PprzLogTransportPutFloatByAddr, _n, _x)

Definition at line 154 of file pprzlog_transport.h.

#define PprzLogTransportPutFloatByAddr (   _dev,
  _x 
)    PprzLogTransportPut4ByteByAddr(_dev, (const uint8_t*)_x)

Definition at line 132 of file pprzlog_transport.h.

#define PprzLogTransportPutFloatFixedArray (   _dev,
  _n,
  _x 
)    PprzLogTransportPutFixedArray(_dev, PprzLogTransportPutFloatByAddr, _n, _x)

Definition at line 179 of file pprzlog_transport.h.

#define PprzLogTransportPutInt16Array (   _dev,
  _n,
  _x 
)    PprzLogTransportPutArray(_dev, PprzLogTransportPutInt16ByAddr, _n, _x)

Definition at line 148 of file pprzlog_transport.h.

#define PprzLogTransportPutInt16ByAddr (   _dev,
  _x 
)    PprzLogTransportPut2ByteByAddr(_dev, (const uint8_t*)_x)

Definition at line 128 of file pprzlog_transport.h.

#define PprzLogTransportPutInt16FixedArray (   _dev,
  _n,
  _x 
)    PprzLogTransportPutFixedArray(_dev, PprzLogTransportPutInt16ByAddr, _n, _x)

Definition at line 173 of file pprzlog_transport.h.

#define PprzLogTransportPutInt32Array (   _dev,
  _n,
  _x 
)    PprzLogTransportPutArray(_dev, PprzLogTransportPutInt32ByAddr, _n, _x)

Definition at line 151 of file pprzlog_transport.h.

#define PprzLogTransportPutInt32ByAddr (   _dev,
  _x 
)    PprzLogTransportPut4ByteByAddr(_dev, (const uint8_t*)_x)

Definition at line 130 of file pprzlog_transport.h.

#define PprzLogTransportPutInt32FixedArray (   _dev,
  _n,
  _x 
)    PprzLogTransportPutFixedArray(_dev, PprzLogTransportPutInt32ByAddr, _n, _x)

Definition at line 176 of file pprzlog_transport.h.

#define PprzLogTransportPutInt64Array (   _dev,
  _n,
  _x 
)    PprzLogTransportPutArray(_dev, PprzLogTransportPutInt64ByAddr, _n, _x)

Definition at line 156 of file pprzlog_transport.h.

#define PprzLogTransportPutInt64ByAddr (   _dev,
  _byte 
)
Value:
{ \
PprzLogTransportPut4ByteByAddr(_dev, (const uint8_t*)_byte+4); \
}
#define PprzLogTransportPut4ByteByAddr(_dev, _byte)
unsigned char uint8_t
Definition: types.h:14

Definition at line 119 of file pprzlog_transport.h.

#define PprzLogTransportPutInt64FixedArray (   _dev,
  _n,
  _x 
)    PprzLogTransportPutFixedArray(_dev, PprzLogTransportPutInt64ByAddr, _n, _x)

Definition at line 181 of file pprzlog_transport.h.

#define PprzLogTransportPutInt8Array (   _dev,
  _n,
  _x 
)    PprzLogTransportPutArray(_dev, PprzLogTransportPutInt8ByAddr, _n, _x)

Definition at line 143 of file pprzlog_transport.h.

#define PprzLogTransportPutInt8ByAddr (   _dev,
  _x 
)    PprzLogTransportPut1ByteByAddr(_dev, _x)

Definition at line 126 of file pprzlog_transport.h.

#define PprzLogTransportPutInt8FixedArray (   _dev,
  _n,
  _x 
)    PprzLogTransportPutFixedArray(_dev, PprzLogTransportPutInt8ByAddr, _n, _x)

Definition at line 168 of file pprzlog_transport.h.

#define PprzLogTransportPutNamedUint8 (   _dev,
  _name,
  _byte 
)    PprzLogTransportPutUint8(_dev, _byte)

Definition at line 80 of file pprzlog_transport.h.

#define PprzLogTransportPutUint16Array (   _dev,
  _n,
  _x 
)    PprzLogTransportPutArray(_dev, PprzLogTransportPutUint16ByAddr, _n, _x)

Definition at line 149 of file pprzlog_transport.h.

#define PprzLogTransportPutUint16ByAddr (   _dev,
  _x 
)    PprzLogTransportPut2ByteByAddr(_dev, (const uint8_t*)_x)

Definition at line 129 of file pprzlog_transport.h.

#define PprzLogTransportPutUint16FixedArray (   _dev,
  _n,
  _x 
)    PprzLogTransportPutFixedArray(_dev, PprzLogTransportPutUint16ByAddr, _n, _x)

Definition at line 174 of file pprzlog_transport.h.

#define PprzLogTransportPutUint32Array (   _dev,
  _n,
  _x 
)    PprzLogTransportPutArray(_dev, PprzLogTransportPutUint32ByAddr, _n, _x)

Definition at line 152 of file pprzlog_transport.h.

#define PprzLogTransportPutUint32ByAddr (   _dev,
  _x 
)    PprzLogTransportPut4ByteByAddr(_dev, (const uint8_t*)_x)

Definition at line 131 of file pprzlog_transport.h.

#define PprzLogTransportPutUint32FixedArray (   _dev,
  _n,
  _x 
)    PprzLogTransportPutFixedArray(_dev, PprzLogTransportPutUint32ByAddr, _n, _x)

Definition at line 177 of file pprzlog_transport.h.

#define PprzLogTransportPutUint64Array (   _dev,
  _n,
  _x 
)    PprzLogTransportPutArray(_dev, PprzLogTransportPutUint64ByAddr, _n, _x)

Definition at line 157 of file pprzlog_transport.h.

#define PprzLogTransportPutUint64ByAddr (   _dev,
  _byte 
)
Value:
{ \
PprzLogTransportPut4ByteByAddr(_dev, (const uint8_t*)_byte+4); \
}
#define PprzLogTransportPut4ByteByAddr(_dev, _byte)
unsigned char uint8_t
Definition: types.h:14

Definition at line 115 of file pprzlog_transport.h.

#define PprzLogTransportPutUint64FixedArray (   _dev,
  _n,
  _x 
)    PprzLogTransportPutFixedArray(_dev, PprzLogTransportPutUint64ByAddr, _n, _x)

Definition at line 182 of file pprzlog_transport.h.

#define PprzLogTransportPutUint8 (   _dev,
  _byte 
)
Value:
{ \
log_ck += _byte; \
}
uint8_t log_ck
#define PprzLogTransportPut1Byte(_dev, _x)

Definition at line 75 of file pprzlog_transport.h.

#define PprzLogTransportPutUint8Array (   _dev,
  _n,
  _x 
)    PprzLogTransportPutArray(_dev, PprzLogTransportPutUint8ByAddr, _n, _x)

Definition at line 144 of file pprzlog_transport.h.

#define PprzLogTransportPutUint8ByAddr (   _dev,
  _x 
)    PprzLogTransportPut1ByteByAddr(_dev, (const uint8_t*)_x)

Definition at line 127 of file pprzlog_transport.h.

#define PprzLogTransportPutUint8FixedArray (   _dev,
  _n,
  _x 
)    PprzLogTransportPutFixedArray(_dev, PprzLogTransportPutUint8ByAddr, _n, _x)

Definition at line 169 of file pprzlog_transport.h.

#define PprzLogTransportSendMessage (   _dev)    TransportLink(_dev, SendMessage())

Definition at line 58 of file pprzlog_transport.h.

#define PprzLogTransportSizeOf (   _dev,
  _payload 
)    (_payload)

Definition at line 54 of file pprzlog_transport.h.

#define PprzLogTransportTrailer (   _dev)
Value:
{ \
}
#define PprzLogTransportSendMessage(_dev)
uint8_t log_ck
#define PprzLogTransportPut1Byte(_dev, _x)

Definition at line 70 of file pprzlog_transport.h.

#define STX_LOG   0x99

Definition at line 52 of file pprzlog_transport.h.

Variable Documentation

uint8_t log_ck

Definition at line 26 of file pprzlog_transport.c.