Files @ 36cc1fe490f7
Branch filter:

Location: CSY/reowolf/examples/incr_2/amy.c

MH
Merge branch 'feat-api-cmds-and-branching'

Implements the programmer-facing API to allow programmatic
specification of a synchronous round. The way in which these put/get
interactions are performed is in an initial shape. Perhaps this will
change in the future.

The second main set of changes is the addion of a 'fork' statement,
which allows explicit forking, and allowing multiple puts/gets over the
same transport link within a single sync round.
/* This example demonstrates:
- protocol descriptions are parsed from ascii text expressed in Reowolf's protocol language, PDL
- protocol descriptions load their PDL at runtime; component's definitions can be changed without recompiling the main program
*/
#include <stdio.h>
#include <string.h>
#include "../../reowolf.h"
#include "../utility.c"

int main(int argc, char** argv) {
	char * pdl_ptr = buffer_pdl("eg_protocols.pdl");
	size_t pdl_len = strlen(pdl_ptr);
	Arc_ProtocolDescription * pd = protocol_description_parse(pdl_ptr, pdl_len);
	Connector * c = connector_new(pd);
	connector_print_debug(c);
	
	protocol_description_destroy(pd);
	connector_destroy(c);
	free(pdl_ptr);
	return 0;
}