DCSModulesAPI  1.0.0
DCS sub project containing all the control modules as libraries.
Public Member Functions | Static Public Member Functions | List of all members
DCS::Registry::SVParams Struct Reference

Auto-generated class that allows for buffer <-> parameters conversion. More...

#include <registry.h>

Public Member Functions

const u16 getFunccode () const
 Retrieve the function code of the currently held parameter list. More...
 
template<typename T >
const T getArg (u64 i) const
 Get the i'th positional argument. Mostly internal use. More...
 

Static Public Member Functions

static const SVParams GetParamsFromData (const unsigned char *payload, i32 size)
 Get all the positional arguments from byte buffer. Mostly internal use. More...
 
template<typename... Args>
static i32 GetDataFromParams (unsigned char *buffer, u16 fcode, Args...args)
 Fill a byte buffer with a list of arguments. use this function to populate the buffer passed to DCS::Network::Message::SendSync / DCS::Network::Message::SendAsync when calling a function. Make sure buffer has enough size to hold the data. Error checking is disabled for speed. More...
 

Detailed Description

Auto-generated class that allows for buffer <-> parameters conversion.

Member Function Documentation

template<typename T >
const T DCS::Registry::SVParams::getArg ( u64  i) const
inline

Get the i'th positional argument. Mostly internal use.

Template Parameters
Tparameter type
Returns
T parameter
template<typename... Args>
static i32 DCS::Registry::SVParams::GetDataFromParams ( unsigned char *  buffer,
u16  fcode,
Args...  args 
)
inlinestatic

Fill a byte buffer with a list of arguments. use this function to populate the buffer passed to DCS::Network::Message::SendSync / DCS::Network::Message::SendAsync when calling a function. Make sure buffer has enough size to hold the data. Error checking is disabled for speed.

Parameters
bufferchar buffer to store function code to be executed + its params
fcodefunction code
argsthe arguments passed to the function represented by fcode
Returns
DCS::i32 size written to buffer
Examples:
sockets/simple_client.cpp.
const u16 DCS::Registry::SVParams::getFunccode ( ) const
inline

Retrieve the function code of the currently held parameter list.

Returns
u16 Func code
const DCS::Registry::SVParams DCS::Registry::SVParams::GetParamsFromData ( const unsigned char *  payload,
i32  size 
)
static

Get all the positional arguments from byte buffer. Mostly internal use.

Parameters
payloadchar buffer
sizebuffer size
Returns
SVParams parameter list

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