I want to draw a sequence diagram for following example.
I know that I can use message line when there is a function call interaction for data exchange. But in this case, read function interface is not defined since the target variable is defined as global for share to other components who want to read. I think all data flow between components has to be depicted during the design without considering whether it is via function interface or not. And i believe that it will give clear information about shared variable to other low level component designers.
Is there any way to draw directly shared variable in sequence diagram?
Following is my example explanation in code and what i want to depict is the variable_a
which is used between A and B.
A.h
extern unsigned char variable_a;
A.c
unsigned char variable_a;
void func_A(void)
{
variable_a = input();
}
B.c
#include "A.h"
void func_B(void)
{
if(variable_a >= 100)
{
//do something
}
else
{
//do something
}
}