Classes | Defines | Functions
dn_robotalk.h File Reference

ROBOTalk API file. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

union  RTK_PACKET
 A type definition for the ROBOTalk packet. More...

Defines

#define _DN_EXP_ROBOTALK
#define NativeCommand(cmd)   ((cmd) & ~RTK_RETRY_MASK)
 A macro that removes the retry flag and count from the ROBOTalk command.
#define RTK_CHECK_RECV   (RTK_CHECK_TYPE | CHECK_FUNC_SEND | CHECK_FUNC_RECV)
 A definition for the check_conn_param function.
#define RTK_CHECK_SEND   (RTK_CHECK_TYPE | CHECK_FUNC_SEND)
 A definition for the check_conn_param function.
#define RTK_CHECK_TYPE   (CHECK_TYPE_UDP | CHECK_TYPE_COM)
 A definition for the check_conn_param function.
#define RTK_CMD_ACK   (0x0E02)
 A definition for the ROBOTalk command which means acknowledge.
#define RTK_CMD_NAK   (0x0E82)
 A definition for the ROBOTalk command which means negative acknowledge.
#define RTK_CMD_REJ   (0x0E01)
 A definition for the ROBOTalk command which means reject.
#define RTK_ENQ   (0x05)
 A definition for the ROBOTalk enquiry.
#define RTK_RETRY_COUNT   (0x2000)
 A definition for the ROBOTalk command. The upper 3bits mean the retry count.
#define RTK_RETRY_FLAG   (0x1000)
 A definition for the ROBOTalk command. This bit means the retry packet.
#define RTK_RETRY_MASK   (0xF000)
 A definition for the ROBOTalk command. The upper 4bits mean the retry packet.
#define RTK_SIZE_COMMAND   (2)
 The command buffer size of a ROBOTalk packet.
#define RTK_SIZE_CRC   (2)
 The CRC buffer size of a ROBOTalk packet.
#define RTK_SIZE_DATA   (RTK_SIZE_PACKET - RTK_SIZE_HEADER)
 The data buffer size of a ROBOTalk packet.
#define RTK_SIZE_HEADER   (6)
 The header buffer size of a ROBOTalk packet.
#define RTK_SIZE_PACKET   (256)
 The maximum buffer size of a ROBOTalk packet.

Functions

_DN_EXP_ROBOTALK uint16_t rtk_calc_crc (const union RTK_PACKET *packet)
 Calculates CRC of the ROBOTalk packet.
_DN_EXP_ROBOTALK 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.
_DN_EXP_ROBOTALK HRESULT rtk_recv (const struct CONN_PARAM_COMMON *device, union RTK_PACKET *packet_recv, int client, unsigned int retry_nak)
 Receives ROBOTalk packet.
_DN_EXP_ROBOTALK HRESULT rtk_send (const struct CONN_PARAM_COMMON *device, union RTK_PACKET *packet_send)
 Sends ROBOTalk packet.

Detailed Description

ROBOTalk API file.

Defines ROBOTalk APIs.

Version:
1.0
Date:
2014/11/06
Author:
DENSO WAVE

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.

Definition in file dn_robotalk.h.


Define Documentation

Definition at line 37 of file dn_robotalk.h.

#define NativeCommand (   cmd)    ((cmd) & ~RTK_RETRY_MASK)

A macro that removes the retry flag and count from the ROBOTalk command.

Parameters:
[in]cmdThe ROBOTalk command.

Definition at line 136 of file dn_robotalk.h.

A definition for the check_conn_param function.

Definition at line 57 of file dn_robotalk.h.

A definition for the check_conn_param function.

Definition at line 51 of file dn_robotalk.h.

A definition for the check_conn_param function.

Note:
ROBOTalk can communicate with UDP and COM.

Definition at line 45 of file dn_robotalk.h.

#define RTK_CMD_ACK   (0x0E02)

A definition for the ROBOTalk command which means acknowledge.

Definition at line 75 of file dn_robotalk.h.

#define RTK_CMD_NAK   (0x0E82)

A definition for the ROBOTalk command which means negative acknowledge.

Definition at line 81 of file dn_robotalk.h.

#define RTK_CMD_REJ   (0x0E01)

A definition for the ROBOTalk command which means reject.

Definition at line 69 of file dn_robotalk.h.

#define RTK_ENQ   (0x05)

A definition for the ROBOTalk enquiry.

Definition at line 63 of file dn_robotalk.h.

#define RTK_RETRY_COUNT   (0x2000)

A definition for the ROBOTalk command. The upper 3bits mean the retry count.

Definition at line 123 of file dn_robotalk.h.

#define RTK_RETRY_FLAG   (0x1000)

A definition for the ROBOTalk command. This bit means the retry packet.

Definition at line 117 of file dn_robotalk.h.

#define RTK_RETRY_MASK   (0xF000)

A definition for the ROBOTalk command. The upper 4bits mean the retry packet.

Definition at line 129 of file dn_robotalk.h.

#define RTK_SIZE_COMMAND   (2)

The command buffer size of a ROBOTalk packet.

Definition at line 105 of file dn_robotalk.h.

#define RTK_SIZE_CRC   (2)

The CRC buffer size of a ROBOTalk packet.

Definition at line 111 of file dn_robotalk.h.

The data buffer size of a ROBOTalk packet.

Definition at line 99 of file dn_robotalk.h.

#define RTK_SIZE_HEADER   (6)

The header buffer size of a ROBOTalk packet.

Definition at line 93 of file dn_robotalk.h.

#define RTK_SIZE_PACKET   (256)

The maximum buffer size of a ROBOTalk packet.

Definition at line 87 of file dn_robotalk.h.


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 dst 
)

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.



bcap_core
Author(s): DENSO WAVE INCORPORATED
autogenerated on Thu Jun 6 2019 21:00:03