semantics icon indicating copy to clipboard operation
semantics copied to clipboard

[KISEMA-1418] Model separate communicating components in one SCChart

Open fabianheyer opened this issue 3 years ago • 0 comments

[Issue KISEMA-1418 migrated from JIRA, first reported on 2019-08-25]

We would like to use SCCharts in some way to specify the communication between multiple components.

50 - ParallelSpec

@CommunicationSpecification "TCPSegment"
--
scchart ParallelSpecification {
extern "sendMessage" sendMessage // Mock
extern "recvMessage" recvMessage // Mock
 
@component
region "Client" {
initial state Initial
do sendMessage("SYN") go to AwaitSYNACK
 
state AwaitSYNACK
if recvMessage("SYN,ACK") do sendMessage("ACK") go to Connected    state Connected
}
 
@component
region "Server" {
initial state AwaitSYN
if recvMessage("SYN") do sendMessage("SYN,ACK") go to AwaitACK
 
state AwaitACK
if recvMessage("ACK") go to Connected
 
state Connected
}
}

I guess we would need some way to define what kind of message should be used for communication (In this case at the first annotation). Then we could use some constuct (which I mocked with send/recvMessage) to signify the parts of the communication.

The whole thing should then generate code for separate components. So in this case we would get Server.h, Server.c, Client.h and Client.c (if using C compilation) or Server.java and Client.java (if generating Java code).

fabianheyer avatar Apr 19 '22 10:04 fabianheyer