...
Call host code functions with dependency analysis. Use angle brackets to point to an extern function. You can also declare extern variables
Column |
---|
|
Code Block |
---|
language | sct |
---|
linenumbers | true |
---|
| scchart MainSCChart {
} |
|
...
Column |
---|
|
Code Block |
---|
language | sct |
---|
linenumbers | true |
---|
| @hostcode "#include <stdio.h>"
@hostcode "#include <stdlib.h>"
@hostcode "#include <unistd.h>"
@hostcode "#include <sys/time.h>"
@hostcode "struct timeval val;"
scchart hostcode {
output int ms;
initial state getChar {
entry / 'gettimeofday(&val, NULL)';
ms = 'val.tv_sec'
}
--> print with / 'printf("Second: %d\\n", ms); fflush( stdout )';
state print
--> getChar;
} |
|
Column |
---|
| |
Image Modified |
Annotations
...