diff --git a/examples/incr_4/amy.c b/examples/incr_4/amy.c new file mode 100644 index 0000000000000000000000000000000000000000..bbb5fe9e0e822d416ffe1797365e37c0cca88d6a --- /dev/null +++ b/examples/incr_4/amy.c @@ -0,0 +1,23 @@ +/* This example demonstrates: +- Connectors in the setup state can add new channels by creating port pairs +*/ +#include +#include +#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); + + PortId putter, getter; + connector_add_port_pair(c, &putter, &getter); + connector_print_debug(c); + + protocol_description_destroy(pd); + connector_destroy(c); + free(pdl_ptr); + return 0; +} \ No newline at end of file