reactor-c
C Runtime for Lingua Franca
Loading...
Searching...
No Matches
rti_common_test.c File Reference
#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 ()
 

Function Documentation

◆ delete_scheduling_node()

void delete_scheduling_node ( scheduling_node_t * node)

Free dynamically allocated memory on the scheduling node.

Parameters
nodeThe node to be freed

◆ main()

int main ( )

◆ not_connected()

void not_connected ( )

◆ reset_common_RTI()

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.

◆ set_common_RTI()

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.

Parameters
num_nodesThe number of scheduling nodes.

◆ set_scheduling_node()

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.

Parameters
idThe ID of the scheduling node.
num_upstreamThe number of upstreams of the scheduling node.
num_downstreamThe number of downstreams of the scheduling node.
upstreamThe array of IDs from upstream nodes.
upstream_delayThe array of delays from upstream nodes.
downstreamThe array of IDs from downstream nodes.

◆ set_state_of_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.

Parameters
stateThe state that every scheduling node will have.

◆ valid_cache()

void valid_cache ( )