Skip to content

CoapMsg

詳細情報

メンバー

CoapMsg()

CoapMsg::CoapMsg(uint8_t *buffer, uint16_t bufferLen)

引数

  • uint8_t * buffer
  • uint16_t bufferLen

CoapMsg()

CoapMsg::CoapMsg(uint8_t *buffer, uint16_t bufferLen, uint16_t packetLen)

引数

  • uint8_t * buffer
  • uint16_t bufferLen
  • uint16_t packetLen

setType()

void CoapMsg::setType(CoapMsg::Type msgType)

引数

  • CoapMsg::Type msgType

getType()

CoapMsg::Type CoapMsg::getType()

戻り値

CoapMsg::Type

setId()

void CoapMsg::setId(uint16_t msgId)

引数

  • uint16_t msgId

getId()

uint16_t CoapMsg::getId()

戻り値

uint16_t

setCode()

void CoapMsg::setCode(CoapMsg::Code code)

引数

  • CoapMsg::Code code

getCode()

CoapMsg::Code CoapMsg::getCode()

戻り値

CoapMsg::Code

getHTTPStatus()

uint16_t CoapMsg::getHTTPStatus()

戻り値

uint16_t

setToken()

CoapMsg::Result CoapMsg::setToken(const uint8_t *token, uint8_t tokenLen)

引数

  • constuint8_t * token
  • uint8_t tokenLen

戻り値

CoapMsg::Result

getToken()

uint8_t * CoapMsg::getToken()

戻り値

uint8_t *

getTokenLen()

uint8_t CoapMsg::getTokenLen()

戻り値

uint8_t

addOption()

CoapMsg::Result CoapMsg::addOption(CoapMsg::Option optionCode, const uint8_t *optionValue, uint16_t optionLen)

引数

  • CoapMsg::Option optionCode
  • constuint8_t * optionValue
  • uint16_t optionLen

戻り値

CoapMsg::Result

getOption()

CoapMsg::Result CoapMsg::getOption(CoapMsg::Option optionCode, uint16_t index, uint8_t *&optionValue, uint16_t &optionLen)

引数

  • CoapMsg::Option optionCode
  • uint16_t index
  • uint8_t *& optionValue
  • uint16_t & optionLen

戻り値

CoapMsg::Result

getOptionCount()

uint16_t CoapMsg::getOptionCount(CoapMsg::Option optionCode)

引数

  • CoapMsg::Option optionCode

戻り値

uint16_t

getOptionLen()

uint16_t CoapMsg::getOptionLen(CoapMsg::Option optionCode, uint16_t index)

引数

  • CoapMsg::Option optionCode
  • uint16_t index

戻り値

uint16_t

getOptionValue()

uint8_t * CoapMsg::getOptionValue(CoapMsg::Option optionCode, uint16_t index)

引数

  • CoapMsg::Option optionCode
  • uint16_t index

戻り値

uint8_t *

setPayload()

CoapMsg::Result CoapMsg::setPayload(const uint8_t *payload, uint16_t payloadLen)

引数

  • constuint8_t * payload
  • uint16_t payloadLen

戻り値

CoapMsg::Result

getPayload()

uint8_t * CoapMsg::getPayload()

戻り値

uint8_t *

getPayloadLen()

uint16_t CoapMsg::getPayloadLen()

戻り値

uint16_t

getMsgBytes()

uint8_t * CoapMsg::getMsgBytes()

戻り値

uint8_t *

getMsgLen()

uint16_t CoapMsg::getMsgLen()

戻り値

uint16_t

isValid()

bool CoapMsg::isValid()

戻り値

bool

getBlock1Size()

uint16_t CoapMsg::getBlock1Size()

戻り値

uint16_t

getBlock1Num()

uint32_t CoapMsg::getBlock1Num()

戻り値

uint32_t

getBlock1More()

bool CoapMsg::getBlock1More()

戻り値

bool

getBlock2Size()

uint16_t CoapMsg::getBlock2Size()

戻り値

uint16_t

getBlock2Num()

uint32_t CoapMsg::getBlock2Num()

戻り値

uint32_t

getBlock2More()

bool CoapMsg::getBlock2More()

戻り値

bool

convertToReset()

Convert this (existing received) message into a reset message.

void CoapMsg::convertToReset()

convertToEmptyAck()

void CoapMsg::convertToEmptyAck()