xsens_imu
Public Member Functions | Protected Attributes | List of all members
xsens::Cmt2f Class Reference

The mid-level file communication class. More...

#include <cmt2.h>

Public Member Functions

 Cmt2f ()
 Default constructor. More...
 
 ~Cmt2f ()
 Destructor. More...
 
XsensResultValue close (void)
 Close the file. More...
 
XsensResultValue closeAndDelete (void)
 Close the file and delete it. More...
 
XsensResultValue create (const char *filename)
 Create a new file with level 2 header. More...
 
XsensResultValue create (const wchar_t *filename)
 Create a new file with level 2 header. More...
 
Cmt1fgetCmt1f (void)
 Get a reference to the embedded Cmt1f object. More...
 
XsensResultValue getLastResult (void) const
 Return the error code of the last operation. More...
 
XsensResultValue getName (char *filename) const
 Retrieve the filename that was last successfully opened. More...
 
XsensResultValue getName (wchar_t *filename) const
 Retrieve the filename that was last successfully opened. More...
 
bool isOpen (void) const
 Return whether the file is open or not. More...
 
XsensResultValue open (const char *filename, const bool readOnly=false)
 Open a file and read the header. More...
 
XsensResultValue open (const wchar_t *filename, const bool readOnly=false)
 Open a file and read the header. More...
 
XsensResultValue readMessage (Message *msg, const uint8_t msgId=0)
 Read the next message from the file, when msgId is non-zero, the first matching message will be returned. More...
 
XsensFilePos getFileSize (void)
 Get the current file size. More...
 
XsensFilePos getReadPosition (void)
 Get the current read position. More...
 
XsensResultValue setReadPosition (XsensFilePos pos)
 Set the read position to the given position. More...
 
XsensResultValue writeMessage (const Message *msg)
 Write a message to the end of the file. More...
 

Protected Attributes

Cmt1f m_cmt1f
 The Cmt1f object that is used for the low-level operations. More...
 
XsensResultValue m_lastResult
 The last result of an operation. More...
 
bool m_readOnly
 When set to true, the file is read-only and attempts to write to it will fail. More...
 

Detailed Description

The mid-level file communication class.

The class uses CMT level 1, but does not inherit from it. If software needs to access the level 1 component, it needs to be done through the getCmt1f() function.

Constructor & Destructor Documentation

xsens::Cmt2f::Cmt2f ( )

Default constructor.

xsens::Cmt2f::~Cmt2f ( )

Destructor.

Member Function Documentation

XsensResultValue xsens::Cmt2f::close ( void  )

Close the file.

XsensResultValue xsens::Cmt2f::closeAndDelete ( void  )

Close the file and delete it.

XsensResultValue xsens::Cmt2f::create ( const char *  filename)

Create a new file with level 2 header.

XsensResultValue xsens::Cmt2f::create ( const wchar_t *  filename)

Create a new file with level 2 header.

Cmt1f * xsens::Cmt2f::getCmt1f ( void  )

Get a reference to the embedded Cmt1f object.

XsensFilePos xsens::Cmt2f::getFileSize ( void  )

Get the current file size.

XsensResultValue xsens::Cmt2f::getLastResult ( void  ) const

Return the error code of the last operation.

XsensResultValue xsens::Cmt2f::getName ( char *  filename) const

Retrieve the filename that was last successfully opened.

XsensResultValue xsens::Cmt2f::getName ( wchar_t *  filename) const

Retrieve the filename that was last successfully opened.

XsensFilePos xsens::Cmt2f::getReadPosition ( void  )

Get the current read position.

bool xsens::Cmt2f::isOpen ( void  ) const

Return whether the file is open or not.

XsensResultValue xsens::Cmt2f::open ( const char *  filename,
const bool  readOnly = false 
)

Open a file and read the header.

XsensResultValue xsens::Cmt2f::open ( const wchar_t *  filename,
const bool  readOnly = false 
)

Open a file and read the header.

XsensResultValue xsens::Cmt2f::readMessage ( Message msg,
const uint8_t  msgId = 0 
)

Read the next message from the file, when msgId is non-zero, the first matching message will be returned.

XsensResultValue xsens::Cmt2f::setReadPosition ( XsensFilePos  pos)

Set the read position to the given position.

XsensResultValue xsens::Cmt2f::writeMessage ( const Message msg)

Write a message to the end of the file.

Member Data Documentation

Cmt1f xsens::Cmt2f::m_cmt1f
protected

The Cmt1f object that is used for the low-level operations.

XsensResultValue xsens::Cmt2f::m_lastResult
mutableprotected

The last result of an operation.

bool xsens::Cmt2f::m_readOnly
protected

When set to true, the file is read-only and attempts to write to it will fail.


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