/* * OCU-to-MESH comm model. It provides the interface between the OCU and the * mesh. * * Created on: Jan 19, 2011 * Author: ignisphaseone */ #ifndef NODE_HPP_ #define NODE_HPP_ typedef struct node{ unsigned int ip_addr; //ip address of the node unsigned int mac_addr; //physical mac address of the node }node; /**This function attempts to communicate with a target node. If successful, it * returns specific information about the node. Otherwise, it returns a null * pointer. */ node* get_node(unsigned int tar_ip_addr); /** Return the current directional throughput from n1 to n2 */ throughput_t get_throughput(node* n1, node* n2); /** Return the current directional latency from n1 to n2 */ latency__t get_latency(node*, node*); /** Return directional signal strength from n1 to n2. */ signal_strength_t get_signal_strength(node* n1, node* n2); /** Return directional weight from n1 to n2, as computed by the MESH alg'n. */ weight_t get_signal_strength(node* n1, node* n2); /** retuen a list of all nodes in the net */ node** get_all_nodes(); /** return list of node neighbors, given a node */ node** get_neighbors(node*); /** Set le target en le manet, le mem chose, n'est pas. */ bool set_target(node*); /** Identify the ocu machine. Call set target first */ bool set_ocu_machine(node*); /** Get the path that has been optimal computed path, per the MANET alg'm */ node** get_preferred_path(); #endif /* NODE_HPP_ */