/* This function adds a transmit trace */ public void AddRxTrace(Csp.Trace trace, Channel.enChannelType chanType) { RxAlphabet.Add(trace); /* Create a transmit channel for this trace */ AddChannel(trace, chanType); }
private void AddChannel(Trace trace, Channel.enChannelType chanType) { if (trace.synchronisation) { /* Add the channel to this Node Process */ Channel channel = new Channel() { ChanType = chanType, publicTrace = GetPublicTrace(trace), privateTrace = GetPrivateTrace(trace), MasterNode = this }; Channels.Add(channel); } }
/* This function adds a transmit and a receive trace */ /* NOTE: This function receives a trace without directional information */ public void AddTxRxTrace(Trace trace, Channel.enChannelType chanType) { String sSyncTraceTx = String.Format("!{0}", trace.Name.Trim(new char[] { '!', '?' })); String sSyncTraceRx = String.Format("?{0}", trace.Name.Trim(new char[] { '!', '?' })); TxAlphabet.Add(new Csp.Trace(trace) { Name = sSyncTraceTx }); RxAlphabet.Add(new Csp.Trace(trace) { Name = sSyncTraceRx }); /* Create a transmit channel for this trace */ AddChannel(trace, chanType); }