Functions
dn_robotalk.c File Reference
#include "stdint.h"
#include <stdlib.h>
#include <string.h>
#include "dn_additional.h"
#include "dn_common.h"
#include "dn_device.h"
#include "dn_udp.h"
#include "dn_robotalk.h"
Include dependency graph for dn_robotalk.c:

Go to the source code of this file.

Functions

uint16_t rtk_calc_crc (const union RTK_PACKET *packet)
 Calculates CRC of the ROBOTalk packet. More...
 
HRESULT rtk_param2packet (uint16_t command, const uint8_t *data, uint8_t len_data, uint8_t from_id, uint8_t to_id, union RTK_PACKET *packet)
 Creates a ROBOTalk packet. More...
 
HRESULT rtk_recv (const struct CONN_PARAM_COMMON *device, union RTK_PACKET *packet_recv, int client, unsigned int retry_nak)
 Receives ROBOTalk packet. More...
 
HRESULT rtk_send (const struct CONN_PARAM_COMMON *device, union RTK_PACKET *packet_send)
 Sends ROBOTalk packet. More...
 
static HRESULT rtk_send_nak (const struct CONN_PARAM_COMMON *device, uint8_t from_id, uint8_t to_id)
 Sends a NAK packet. More...
 

Function Documentation

uint16_t rtk_calc_crc ( const union RTK_PACKET packet)

Calculates CRC of the ROBOTalk packet.

Parameters
[in]packetThe ROBOTalk packet to be calculated.

Definition at line 118 of file dn_robotalk.c.

HRESULT rtk_param2packet ( uint16_t  command,
const uint8_t data,
uint8_t  len_data,
uint8_t  from_id,
uint8_t  to_id,
union RTK_PACKET packet 
)

Creates a ROBOTalk packet.

Parameters
[in]commandThe ROBOTalk command.
[in]dataThe ROBOTalk data.
[in]len_dataThe length of data.
[in]from_idThe id of host.
[in]to_idThe id of the target client.
[out]packetThe created ROBOTalk packet.

Definition at line 86 of file dn_robotalk.c.

HRESULT rtk_recv ( const struct CONN_PARAM_COMMON device,
union RTK_PACKET packet_recv,
int  client,
unsigned int  retry_nak 
)

Receives ROBOTalk packet.

Parameters
[in]deviceThe common communication parameters.
[out]packet_recvThe ROBOTalk packet to be received.
[in]clientFlag that means the receiver is client(1) or not(0).
[in]retry_nakThe retry count when receiving the NAK packet.

Definition at line 193 of file dn_robotalk.c.

HRESULT rtk_send ( const struct CONN_PARAM_COMMON device,
union RTK_PACKET packet_send 
)

Sends ROBOTalk packet.

Parameters
[in]deviceThe common communication parameters.
[in]packet_sendThe ROBOTalk packet to be sent.

Definition at line 143 of file dn_robotalk.c.

HRESULT rtk_send_nak ( const struct CONN_PARAM_COMMON device,
uint8_t  from_id,
uint8_t  to_id 
)
static

Sends a NAK packet.

Software License Agreement (MIT License)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Parameters
[in]deviceThe common communication parameters.
[in]frm_idThe id of host.
[in]to_idThe id of the target client.

Definition at line 50 of file dn_robotalk.c.



bcap_core
Author(s): DENSO WAVE INCORPORATED
autogenerated on Mon Jun 10 2019 13:12:20