#include "its_common.h"
#include "mrf24j40.h"
#include "pic_serial.h"
#include "wpan.h"
#include "debug.h"
Go to the source code of this file.
Functions | |
its_device_handle | its_add_local_device (uns16 device_id, uns16 pan_id, uns16 short_address) |
its_device_handle | its_add_net_device (uns16 device_id, uns16 previous_hop) |
its_device_handle | its_get_device_handle (uns16 device_id) |
uns16 | its_get_device_id () |
its_device_info * | its_get_device_info (uns8 handle) |
uns16 | its_get_network_id () |
Retrieve the current network ID. | |
uns8 | its_get_next_sequence () |
void | its_init () |
Initialise ITS and lower layers. | |
void | its_print_devices () |
Print devices currently known to this one. | |
void | its_set_device_id (uns16 device_id) |
Set the ITS device ID. | |
void | its_set_network_id (uns16 network_id) |
Set the ITS network ID. | |
void | its_transmit_to_ea (uns8 *dest_ea, uns16 dest_its_device_id, uns8 packet_type, uns8 *data, uns8 data_length) |
void | its_transmit_to_handle (its_device_handle handle, uns8 packet_type, uns8 *data, uns8 data_length) |
void | its_transmit_to_sa (uns16 dest_pan_id, uns16 dest_sa, uns16 dest_device_id, uns8 packet_type, uns8 *data, uns8 data_length) |
Variables | |
uns16 | its_device_id |
its_device_info | its_devices [ITS_MAX_KNOWN_DEVICES] |
uns16 | its_network_id |
uns8 | its_sequence = 0 |
its_device_handle its_add_local_device | ( | uns16 | device_id, | |
uns16 | pan_id, | |||
uns16 | short_address | |||
) |
Definition at line 127 of file its_common.c.
References its_device_info::addr, debug_int_hex_16bit, debug_str, its_device_info::its_device_id, its_device_id, ITS_DEVICE_NONE, its_print_devices(), its_address::local, local_address::pan_id, local_address::short_address, and uns8.
Referenced by its2_router_handle_association().
its_device_handle its_add_net_device | ( | uns16 | device_id, | |
uns16 | previous_hop | |||
) |
Definition at line 158 of file its_common.c.
References its_device_info::addr, debug_int_hex_16bit, debug_str, its_device_info::its_device_id, its_device_id, ITS_DEVICE_NONE, its_print_devices(), remote_address::prior_device_id, its_address::remote, remote_address::remote_indicator, and uns8.
its_device_handle its_get_device_handle | ( | uns16 | device_id | ) |
Definition at line 108 of file its_common.c.
References its_device_id, ITS_DEVICE_NONE, and uns8.
Referenced by its2_forward_routed_packet(), and its2_router_handle_association().
uns16 its_get_device_id | ( | ) |
Definition at line 89 of file its_common.c.
References its_device_id.
Referenced by its2_process_tx_queue(), its2_rebroadcast_net_discover_req(), and its2_router_queue_packet().
its_device_info* its_get_device_info | ( | uns8 | handle | ) |
Definition at line 100 of file its_common.c.
Referenced by its2_forward_routed_packet(), and its2_transmit().
uns16 its_get_network_id | ( | ) |
Definition at line 81 of file its_common.c.
References its_network_id.
Referenced by its2_router_queue_packet().
uns8 its_get_next_sequence | ( | ) |
Definition at line 72 of file its_common.c.
References its_sequence.
Referenced by its2_router_queue_packet().
void its_init | ( | ) |
Call before using any ITS functionality
Definition at line 93 of file its_common.c.
References its_device_info::its_device_id, uns8, and wpan_init().
Referenced by its1_controller_init(), its1_device_init(), its2_device_init(), and its2_router_init().
void its_print_devices | ( | ) |
Definition at line 51 of file its_common.c.
References debug_int_hex_16bit, debug_nl, debug_str, its_device_id, and uns8.
Referenced by its_add_local_device(), and its_add_net_device().
void its_set_device_id | ( | uns16 | device_id | ) |
Set the ITS device ID before sending packets. See also: its_set_network_id(uns16 network_id);
Definition at line 85 of file its_common.c.
References its_device_id.
Referenced by its1_controller_init(), its1_device_init(), its2_device_init(), and its2_router_init().
void its_set_network_id | ( | uns16 | network_id | ) |
Set the ITS network ID before sending packets See also: its_set_device_id(uns16 device_id);
Definition at line 76 of file its_common.c.
References its_network_id.
Referenced by its1_controller_init(), its1_device_init(), its2_device_init(), and its2_router_init().
void its_transmit_to_ea | ( | uns8 * | dest_ea, | |
uns16 | dest_its_device_id, | |||
uns8 | packet_type, | |||
uns8 * | data, | |||
uns8 | data_length | |||
) |
Definition at line 232 of file its_common.c.
References FRAME_TYPE_DATA, its_device_id, its_network_id, its_sequence, mrf24j40_transmit_to_extended_address(), MRF_NO_ACK, and uns8.
Referenced by its1_device_process().
void its_transmit_to_handle | ( | its_device_handle | handle, | |
uns8 | packet_type, | |||
uns8 * | data, | |||
uns8 | data_length | |||
) |
Definition at line 185 of file its_common.c.
References its_device_info::addr, its_device_info::its_device_id, its_transmit_to_sa(), its_address::local, and local_address::short_address.
Referenced by its1_controller_handle_association(), its1_controller_transmit(), its1_device_transmit(), its2_device_transmit(), and its2_router_handle_association().
void its_transmit_to_sa | ( | uns16 | dest_pan_id, | |
uns16 | dest_sa, | |||
uns16 | dest_device_id, | |||
uns8 | packet_type, | |||
uns8 * | data, | |||
uns8 | data_length | |||
) |
Definition at line 195 of file its_common.c.
References FRAME_TYPE_DATA, its_device_id, its_network_id, its_sequence, mrf24j40_transmit_to_short_address(), MRF_ACK, uns16, and uns8.
Referenced by its2_device_process(), and its_transmit_to_handle().
uns16 its_device_id |
Definition at line 47 of file its_common.c.
Referenced by its_add_local_device(), its_add_net_device(), its_get_device_handle(), its_get_device_id(), its_print_devices(), its_set_device_id(), its_transmit_to_ea(), and its_transmit_to_sa().
its_device_info its_devices[ITS_MAX_KNOWN_DEVICES] |
Definition at line 44 of file its_common.c.
uns16 its_network_id |
Definition at line 46 of file its_common.c.
Referenced by its_get_network_id(), its_set_network_id(), its_transmit_to_ea(), and its_transmit_to_sa().
uns8 its_sequence = 0 |
Definition at line 49 of file its_common.c.
Referenced by its_get_next_sequence(), its_transmit_to_ea(), and its_transmit_to_sa().