MIP_SDK  latest-2-g34f3e39
MicroStrain Communications Library for embedded systems
Public Member Functions | List of all members
mip::PacketView::AllocatedField Class Reference

#include <mip_packet.hpp>

Inheritance diagram for mip::PacketView::AllocatedField:
microstrain::Serializer< E > microstrain::SerializerBase

Public Member Functions

 AllocatedField (mip::PacketView &packet, uint8_t *buffer, size_t space)
 
AllocatedFieldoperator= (const AllocatedField &)=delete
 
uint8_t * allocateOrCancel (size_t length)
 
bool commit ()
 
void cancel ()
 
- Public Member Functions inherited from microstrain::Serializer< E >
template<typename... Ts>
bool insert (const Ts &... values)
 Serializes one or more values. More...
 
template<typename... Ts>
bool extract (Ts &... values)
 Deserializes one or more values. More...
 
template<class T , class S >
bool extract_count (T &count, S max_count)
 Deserializes an integer with maximum permissible value. More...
 
template<class T , class S >
bool extract_count (T *count, S max_count)
 
 SerializerBase ()=default
 
 SerializerBase (uint8_t *ptr, size_t capacity, size_t offset=0)
 
 SerializerBase (const uint8_t *ptr, size_t size, size_t offset=0)
 
 SerializerBase (microstrain::Span< const uint8_t > buffer, size_t offset=0)
 
- Public Member Functions inherited from microstrain::SerializerBase
 SerializerBase ()=default
 
 SerializerBase (uint8_t *ptr, size_t capacity, size_t offset=0)
 
 SerializerBase (const uint8_t *ptr, size_t size, size_t offset=0)
 
 SerializerBase (microstrain::Span< const uint8_t > buffer, size_t offset=0)
 
uint8_t * getPointer (size_t required_size)
 Obtains a pointer to the current offset for reading/writing a value of the specified size. This function does NOT advance the offset value. Generally, you should use getPtrAndAdvance() instead. More...
 
uint8_t * getPtrAndAdvance (size_t size)
 Obtains a pointer to the current offset for reading/writing a value of specified size, and post-increments the offset by that size. Use this function just like pointer(). More...
 
void invalidate ()
 Marks the buffer as invalid, i.e. overrun/error state. All further accesses via pointer(), getPtrAndAdvance(), etc. will fail. (basePointer() and capacity() remain valid) More...
 
size_t setOffset (size_t offset)
 Sets a new offset and returns the old value. This can be used to save/restore the current offset. Calling setOffset() after an overrun with an in-range (i.e. non-overrun) value restores the non-overrun status. More...
 

Additional Inherited Members

- Static Public Attributes inherited from microstrain::Serializer< E >
static const serialization::Endian ENDIAN = E
 

Constructor & Destructor Documentation

◆ AllocatedField()

mip::PacketView::AllocatedField::AllocatedField ( mip::PacketView packet,
uint8_t *  buffer,
size_t  space 
)
inline

Member Function Documentation

◆ allocateOrCancel()

uint8_t* mip::PacketView::AllocatedField::allocateOrCancel ( size_t  length)
inline

◆ cancel()

void mip::PacketView::AllocatedField::cancel ( )
inline

◆ commit()

bool mip::PacketView::AllocatedField::commit ( )
inline

◆ operator=()

AllocatedField& mip::PacketView::AllocatedField::operator= ( const AllocatedField )
delete

The documentation for this class was generated from the following file: