reactor-c
C Runtime for Lingua Franca
|
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <string.h>
#include "rti_remote.h"
#include "rti_common.h"
#include "tag.h"
Functions | |
void | delete_scheduling_node (scheduling_node_t *node) |
void | set_scheduling_node (int id, int num_upstream, int num_downstream, int *upstream, interval_t *upstream_delay, int *downstream) |
void | reset_common_RTI () |
void | set_common_RTI (uint16_t num_nodes) |
void | set_state_of_nodes (scheduling_node_state_t state) |
void | valid_cache () |
void | not_connected () |
int | main () |
void delete_scheduling_node | ( | scheduling_node_t * | node | ) |
Free dynamically allocated memory on the scheduling node.
node | The node to be freed |
int main | ( | ) |
void not_connected | ( | ) |
void reset_common_RTI | ( | ) |
Reset the RTI to re-construct the structure of nodes. This includes freeing every scheduling node and the array of nodes.
void set_common_RTI | ( | uint16_t | num_nodes | ) |
Set the number of nodes and create an array for scheduling nodes. This includes resetting the previous RTI.
num_nodes | The number of scheduling nodes. |
void set_scheduling_node | ( | int | id, |
int | num_upstream, | ||
int | num_downstream, | ||
int * | upstream, | ||
interval_t * | upstream_delay, | ||
int * | downstream ) |
Set the parameters of scheduling node to construct the test case. Before calling this function, reset_common_RTI should be called to reset every scheduling nodes.
id | The ID of the scheduling node. |
num_upstream | The number of upstreams of the scheduling node. |
num_downstream | The number of downstreams of the scheduling node. |
upstream | The array of IDs from upstream nodes. |
upstream_delay | The array of delays from upstream nodes. |
downstream | The array of IDs from downstream nodes. |
void set_state_of_nodes | ( | scheduling_node_state_t | state | ) |
Set the state of every scheduling node. The state can be NOT_CONNECTED, GRANTED, or PENDING.
state | The state that every scheduling node will have. |
void valid_cache | ( | ) |