<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta>
      <journal-title-group>
        <journal-title>September</journal-title>
      </journal-title-group>
    </journal-meta>
    <article-meta>
      <title-group>
        <article-title>Measurement Automation for IoT Edge Devices</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Salma Salem</string-name>
          <email>salma.abdallahsalem@student.guc.edu.eg</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Hassan Soubra</string-name>
          <email>hsoubra@ece.fr</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>ECE-École centrale d'électronique</institution>
          ,
          <addr-line>Lyon</addr-line>
          ,
          <country country="FR">France</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>German University in Cairo</institution>
          ,
          <addr-line>New Cairo</addr-line>
          ,
          <country country="EG">Egypt</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2023</year>
      </pub-date>
      <volume>1</volume>
      <fpage>4</fpage>
      <lpage>15</lpage>
      <abstract>
        <p>The Internet of Things (IoT) was born when Edge devices were interconnected via the internet allowing them to send and receive data back and forth. Edge devices are actually embedded systems processing data in real-time close to the physical environment in which they are deployed. Functional Size Measurement (FSM) is a tool to measure functionality provided by a software and obtain technical indicators early in the design phase. The COSMIC method is an international standard for functional size measurement of a software. A study [2] discussed FSM for Internet of things (IoT) real-time embedded software and proposed a guideline using Arduino. Another study in [8] proposed the idea of Universal IoT metrics and automated some metrics proposed. This paper presents an approach to automatically measure COSMIC functional size of any IoT Edge Device code. This paper is based on the measurement procedure rules presented in [2], and it attempts to complete the tool presented in [8].</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>The Internet of Things (IoT) is a collection of Edge Devices sending and receiving data via
networks that needs to be processed and analysed.</p>
      <p>Instead of sending IoT data systematically back to a datacenter or to the cloud, edge computing,
a technique for computing on site where data is received or used, allows IoT data to be captured
and processed at the edge.</p>
      <p>IoT and edge computing work well together to quickly analyse data in real-time.</p>
      <p>An IoT system typically operates by transmitting, receiving, and analysing data in a feedback
loop perpetually. Humans or artificial intelligence and machine learning can perform analysis,
either in near real-time or over a longer period of time.</p>
      <p>When anything is described as smart, IoT is usually implied, e.g., autonomous vehicles, smart
houses, smartwatches, virtual and augmented reality, and industrial IoT.</p>
      <p>
        The COSMIC method is an International Standard: ISO/IEC 19761 Software Engineering –
COSMIC – A functional size measurement (FSM) method and as greatly contributed in improving
Software measurement and estimation processes in both research and industry [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. COSMIC
provides a standardized method for measuring the functional size of software from both the
Management Information Systems perspective and real-time. Software functional size can be
used for a number of purposes: to obtain system related technical indicators early in the design
phase which in turn can impact performance. It can also be used to estimate development efort,
manage project scope changes, measure productivity, benchmark and normalize quality and
maintenance ratios.
      </p>
      <p>
        In 2017, [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] introduced IoT and COSMIC based FSM for software running on the Arduino
platform.
      </p>
      <p>
        Many automated COSMIC FSM procedures have been proposed in the literature for other
diferent domains e.g., aeronautical [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ], automotive [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ], quantum computing [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ] and computer
Hardware [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ].
      </p>
      <p>
        This paper is based on the measurement procedure rules presented in [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ], and it attempts to
complete the IoT metrics automation tool presented in [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ], by implementing a COSMIC FSM
automation tool for IoT Edge devices.
      </p>
      <p>
        This paper is organised as follow: Section 2 presents related works including overviews of [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]
and [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ]. While section 3 describes the Methodology of our automated tool, Section 4 introduces
our tool proposed and the testing carried and the results obtained. Finally, conclusions and
future work follow in Section 5.
      </p>
    </sec>
    <sec id="sec-2">
      <title>2. Background</title>
      <p>This section discusses related work on Functional size measurement for IoT as well as papers
investigating IoT metrics.</p>
      <p>
        The study in [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] utilized the COSMIC method to measure the Functional size of IoT Software
by mapping the COSMIC method concepts to Arduino’s. Two main elements are needed to map
COSMIC to Arduino.
      </p>
      <p>First, data group movements and the associated data manipulations that determine software
functionality according to COSMIC are: ENTRY (E) and EXIT(X) data movements that allow
data exchange with users across a boundary. READ (R) and WRITE(W) data movements that
allow data exchange with the persistent storage.</p>
      <p>Second, functional processes which are defined according to COSMIC as a set of data
movements, representing an elementary part of the functional user requirements (FUR) for the
software being measured that is unique within these FUR and that can be defined independently
of any other functional process in these FUR. A functional process may have only one triggering
Entry. Each functional process starts processing on receipt of a data group moved by the
triggering Entry data movement of the functional process. The set of all data movements of a
functional process is the set that is needed to meet its FUR for all the possible responses to its
triggering Entry.</p>
      <p>
        The mapping of COSMIC elements to Arduino elements is made in [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] :
• In the Arduino code, the setup() and loop() functions are considered as functional processes
and each of them has merely one triggering Entry. The setup() function is triggered upon
power up or reset of the system. The loop() is triggered upon the completion of setup()
and it runs perpetually or until the powering of of the system. Furthermore, all data
movements needed for functional user requirements take place in both of these functions.
Declaring pins as input or output (sensor or actuator) occurs in the setup() functions and
then, in the perpetual loop() function, data flows between the system and the sensors or
actuators which are considered to be functional users of the software.
• The mapping of the Movement of data flows can be summarized as follows:
1. Entry represents the one and only one flow of a single data group from the functional
user (e.g., sensor) across a boundary to a functional process.
2. Exit represents the one and only one flow of a single data group from the functional
process across a boundary to a functional user (e.g., actuators).
3. Read represents the movement of one and only one single data group from persistent
storage (e.g., EEPROM) to functional processes.
4. Write represents the movement of one and only one single data group from functional
processes persistent storage (e.g., EEPROM).
      </p>
      <p>
        Hence, each INPUT pin used as an argument in a function is considered as a COSMIC Entry.
Meanwhile,each OUTPUT pin used in as an argument in a function is a COSMIC Exit. Further
more, each function call used for reading data from EEPROM counts as a COSMIC Read.
Meanwhile, each function call used to write data to EEPROM counts as COSMIC Write.
The study in [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ] proposed the idea of Universal IoT metrics which tends to group related
metrics in specific classes based on the ISO 25023 standard. In addition, [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ] presented a tool to
automatically measure one of the universal metrics defined in the paper, namely the Functional
Suitability metric. nevertheless, the tool in [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ] does not integrate COSMIC FSM.
      </p>
      <p>
        Lastly, the authors in [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ] used a set of five research questions on the present knowledge bases
for IoT metrics to perform a review of the literature based on studies published between January
2010 and December 2021. According to the many components and features of an IoT system,
158 IoT metrics were discovered and divided into 12 categories. The 12 criteria were arranged
into an ontology to encompass the total performance of an IoT system. The findings indicate
that 43% of the studies covered network metrics the most, and that 37% of those studies had the
maximum amount of metrics. This study can ofer recommendations for choosing metrics for
IoT systems as well as insightful information on areas for enhancement and optimisation.
      </p>
    </sec>
    <sec id="sec-3">
      <title>3. Methodology</title>
      <p>
        This section presents the prototype tool implemented for automating COSMIC functional size
measurement for IoT Edge devices relying on the measurement procedure presented in [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] and
it follows the automatic metrics retrieval approach implemented in [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ].
      </p>
      <p>The tool is divided into two modules as depicted in Figure 1. The first module retrieves the
source code from the micro-controller. The Second module measures the FSM of the retrieved
source code in Comic Functional Points (CFP). The Message Queueing Telemetry Transport
(MQTT) protocol which is an extremely lightweight publish/subscribe messaging transport
protocol is used in our tool for sending the retrieved code from the first to the second module
as well as publishing the size in CFP of the retrieved code. Hence, each module of the tool acts
as an MQTT client.</p>
      <p>Initially, a connection between the micro-controller and a MQTT client should be established,
this connection is aimed to send the code of the micro-controller via the internet to another
MQTT client (Module 2 of our tool proposed) to measure automatically the COSMIC functional
size of the retrieved code in CFP. HiveMQ MQTT cloud broker is used.
3.1. Module 1
The main objective of Module 1 is to retrieve the source code running on the micro-controller
and to send it using MQTT. Since the programming languages used on Edge devices are not
a high level language, the source code cannot be retrieved automatically (e.g., as opposed to
JavaScript through invoking a .body() function call to retrieve the functions of the source code).
Hence, in order to retrieve the source code of Edge devices (e.g., Arduino, ESP), 4 potential
approaches are explored:
• Approach 1: This approach requires manual manipulations from the user’s side. First, the
user has to retrieve the .elf file from the Arduino Ide by ticking the compilation option in
preferences submenu found in the file menu. Secondly the user has to use either AVR or
Xtensa tool using specific commands to convert the .elf file to assembly and next the user
has to install MQQT CLI and establish connection with a client using specific commands
that can be scripted and copy and paste manually the assembly code in a message and
send it via CLI. To that end, this approach was excluded due to the multiple manual steps
that are needed by the user.
• Approach 2: This approach consist of saving the code as a pre-requisite in the EEPROM
and the FSM tool includes a function that automatically retrieves the code from EEPROM.
This approach can be easily automated. However, it has its own drawbacks. For instance,
the EEPROM has limited amount of storage size and hence codes with size exceeding a
certain threshold will not fit in the EEPROM. In addition to the fact that the EEPROM
might be used by the program itself to store and retrieve functional or calibration data
needed by the Edge device. In addition, certain rules have to be followed by the user: the
Edge device programmer should pass the starting address in the function to be called
to read the source code from the EEPROM as well as the Lines of codes including the
separators used. Secondly, the Edge device programmer must store after every line of
code a special character, e.g., “!” , since the EEPROM is byte addressable and an indicator
on where every line of code starts and where it ends is needed. Finally, the Edge device
programmer has to store another special character, e.g., “@”, in the EEPROM to mark the
end of the file. See example in Figure 2.
• Approach 3: This approach consists of saving the code as a pre-requisite on an external
SD- card and the FSM prototype tool proposed includes a function that automatically
retrieves the code from the SD-card. Using an SD-card is as a practical solution when it
comes to storage, however, it requires extra Hardware connections to the micro-controller
of the Edge device.
• Approach 4: This approach consists of storing the source code in the file system of the
micro-controller, our tool includes a function which parameters should be passed by the
user which is the source code and the function automatically saves it in the file system.
Next, another function can be called without passing any parameters to retrieve the
source code from the file system and send it via MQTT to the Module 2 of the tool. The
code has to be passed as a String and line separators ”\n” have to be added to indicate
the end of each line, as shown in Figure 3.</p>
      <p>For instance, when using boards that do not support File systems such as Arduino, we
recommend following Approach 2 in case of a small size code (in Bytes) or to use an external SD-card
(Approach 3) if the source code exceeds a certain size in Bytes. Conversely, we recommend
Approach 4 when using ESP boards since ESP boards support File systems which storage capacity
is suficient for any code size without neither acquiring extra hardware connection to store
the code in an external SD-card nor facing the limitations of memory storage capacity of the
EEPROM.</p>
      <p>Once the source code has been extracted, the connection between the MQTT client and
MQTT broker is done and next the source code is published via the network to another MQTT
client. To ensure the re-usability of our functions, they are wrapped in a class enabling them to
be imported: this requires Wi-Fi credentials as well as the Hive MQTT credentials to initialize
the class. In addition, functions relevant to the approach used should be called with the required
parameters in the specific format, as described earlier, and the function will automatically
publish the source code to a specific code to be received by the second MQTT client (Module 2 )
to measure the functional size in CFP of the source code retrieved.
3.2. Module 2
Module 2’s main functionality, implemented as a JavaScript MQTT client, is to automatically
measure the COSMIC size of the source code retrieved. Module 2 (the second MQTT client)
receives the source code from the first MQTT client (Module 1) as a String. This code is
analyzed and the COSMIC Entry, Exit, Read and Write data movements are identified in the code.
JavaScript is used because it is a high-level language that supports String comparison which is
needed for the Data movement identification.</p>
      <p>The libraries that are taken into consideration in the current implementation of the prototype
tool proposed are:
• Serial library: used for serial communication between the micro-controller and a serial
monitor or another micro-controller. Hence, its function calls will either represent an
Entry or an Exit.
• EEPROM library: used from reading and writing data to and from persistent storage.</p>
      <p>Hence it functions calls either represent a Read or a Write.
• Liquid Crystal: used to control print data on an LCD (Actuator). Hence, its function calls
are considered as an Exit.
• WiFi : Enables connection with between edge devices and internet network . Hence, its
function calls will either represent an Entry or an Exit.</p>
      <sec id="sec-3-1">
        <title>3.3. Use of the prototype tool proposed</title>
        <p>The usage of our prototype tool is not restricted on a certain IoT domain since Module 2 of
the tool relies on parsing the source code retrieved from the micro-controller and checking
line by line for the existence of any data group movements. It is also worth mentioning that
the function call responsible for source code retrieval and sending it via MQTT to the second
module will not infer with other tasks running on the Micro-controller since the function is
called once in the Set-up function and will not run perpetually so no need to endure extra costs
or re-schedule the tasks running .Hence,the steps required to use our prototype tool are:
1. Register to HiveMQ cloud and create a cluster. Next, create 2 web Clients and save their
credentials.
2. Use the credentials of the first web client in the second module of the tool to establish
a connection with the MQTT broker and subscribing to the topics of interest: Lines of
code, CFP, Entry, Exit, Read, Write.
3. Use the credentials of the second web client as well as wifi credentials in the IoT Edge
device to establish a connection with the MQTT broker and calling the function dedicated
for sending the code with the appropriate parameters previously mentioned relying on
any of the 3 automatable approaches described earlier to the first web client to measure
the COSMIC functional size in CFP. The details of the measurement results are displayed
in the console. It is possible for the IoT Edge device to subscribe to the same topics as
the JavaScript client if the measurement result is needed to be displayed on the IoT Edge
device (e.g., displaying the COSMIC size of the Edge device’s code on its LCD).
Hence, it is only required from the user to choose the most convenient approach required for
source code retrieval in module 1 of the tool based on the parameters mentioned above which
are the type of the board, the size of the source code running , possibility to add extra-hardware
connections ,afterwards, the user has to merely call the function corresponding for the approach
that was adopted provided that the prerequisites of the approach are already met and that the
connection using the Wi-Fi credentials is established. The MQTT client of the second module
has to be connected to the MQTT broker before attempting to send the source code via the first
module since the second module receives the code published from the first module.</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>4. Testing and Results</title>
      <sec id="sec-4-1">
        <title>4.1. Automated COSMIC FSM testing</title>
        <p>
          In order to verify the accuracy of the automated functional size measurement of Module 2, the
example code used in [
          <xref ref-type="bibr" rid="ref2">2</xref>
          ], see Figure 5, was used for testing since its functional size is also
measured and the detailed measurement results are presented in the research paper. According
to [
          <xref ref-type="bibr" rid="ref2">2</xref>
          ], the COSMIC size measurement of the example code is 17 CFP and 3 Entry and 14 Exit
data movements are identified.
        </p>
        <p>The automated measurement result of the example code produced by Module 2 of our
prototype tool proposed is shown in Figure 4: the prototype tool has correctly and accurately
identified 3 Entry and 14 Exit data movements for a total COSMIC functional size of 17 CFP.</p>
      </sec>
      <sec id="sec-4-2">
        <title>4.2. Code retrieval and measurement testing</title>
        <p>The second test consists of establishing the connection between our JavaScript client and the
IoT Edge Device and verifying that the Edge Device is able to send the source code
properly to the JavaScript client. For this purpose, the JavaScript client subscribed to a new topic
namely (test/topic) which is also used by the IoT Edge Device (the Arduino client in this
example) to publish its source code. The code in Figure 6 is used to retrieve the source code from
the EEPROM and publish it to the topic named (test/topic) to be received by the JavaScript client.</p>
        <p>The connection was established successfully and the Arduino client was able to send its
source code to the JavaScript client, a simple code example that prints the word “IoT” to the
serial monitor is stored in the EEPROM (approach 2) and the Arduino client was able to retrieve
the code from the EEPROM and send it to the JavaScript client. The simple code example used
is shown in Figure 7. It is important to note that the code sent by the Arduino broker did not
include the comments to save space, since we followed the second approach that requires as a
prerequisite storing in advance the source code (without the comments) in the EEPROM. See
Figure 8.</p>
        <p>Finally, the code sent by the Arduino client is measured automatically by the JavaScript client
and then the results are published as shown in Figure 9.</p>
      </sec>
      <sec id="sec-4-3">
        <title>4.3. Real life application test and discussion</title>
        <p>
          Once the functionality of the prototype tool proposed has been tested with simple code examples,
the source code from [
          <xref ref-type="bibr" rid="ref10">10</xref>
          ] was used as a real-life IoT application test for its containment of
multiple functions calls used to connect or send data via the WiFi network which is essential in
any IoT applications. The Edge device running the code measures the temperature and sends
the values via the Internet to a web page, see Figure 10. The testing results showed that: the
COSMIC functional size of the real-life application example obtained automatically by the tool
is 43 CFP. The automated results have been verified following the accuracy protocol in [
          <xref ref-type="bibr" rid="ref11">11</xref>
          ] and
the accuracy of the results produced by the prototype tool proposed for the real-life application
example is 93.4%. While Table 2 shows the detailed data movements identification per functional
process, Table 3 summarizes the results of the total COSMIC FSM size of the test in CFP.
        </p>
        <p>Testing the real life example code inferred the following key points about the tool accuracy
and usability :
• The prototype tool currently is able to identify multiple function calls included in the basic
libraries used for communication (e.g., Serial, Wifi) as well as basic function calls used for
interacting with functional users (i.e. sensors and actuators). Nevertheless, measuring
functional size accurately requires detailed analysis of every function call found in every
library which is a dificult task due to the big number of these libraries.
• The current version of the prototype tool restricts the way of writing the Edge device
code. To clarify, the tool assumes when defining a function that every (”{”) is written in
the same line where the function name, conditional statements or loops are written. In
addition, comments are assumed to be written in separate lines from the actual codes.
Otherwise, the prototype tool will not be able to identify all COSMIC Data Movements
successfully. For instance, in the real-life example temperature sensing code, the tool
failed in identifying 3 data movements identifications:
– 1X: Serial.print(”http://”); because // was considered a comment by the tool;
– 1E: float reading = analogRead(LM35); and 1X:client.println(””); had comments in
the same line. H</p>
        <p>Hence, the main limitation lies in the numerous number of libraries supported by Arduino or
ESP boards dedicated merely for certain functional users (i.e sensors or actuators). This causes
the inability of our prototype proposed in identifying data group movements related to these
libraries’ function calls.
1X:WiFiServer server(80);
1E:Trigger (setup function call)
1X:Serial.begin(115200);
1X:delay(10);
1X:Serial.println();
1X:Serial.println();
1X:Serial.print(”Connecting to ”);
1X:Serial.println(ssid);
1X:WiFi.begin(ssid,password);
WL- 1E:while (WiFi.status() !=
WL</p>
        <p>CONNECTED)
1X:delay(500);
1X:Serial.print(”.”);
1X:Serial.println(””);
1X:Serial.println(”WiFi connected”)
1X:server.begin();
1X:Serial.println(”Server started”);
1X: Serial.print(”Use this URL to
connect: ”)
UNIDENTIFIED BY THE TOOL
1X:Serial.print(WiFi.localIP());
1X:Serial.println(”/”);
1E: Trigger (setup complete) 1E: Trigger (setup complete)
1X,1E:WiFiClient client = 1X,1E:WiFiClient client =
server.available(); server.available();
1X:Serial.println(”new client”); 1X:Serial.println(”new client”);
1E:while(!client.available()) 1E:while(!client.available())
1X:delay(1); 1X:delay(1);
1E:String request = client.read- 1E:String request =
client.readStringUntil(’’̊); StringUntil(’’̊);
1X:Serial.println(request); 1X:Serial.println(request);
1E: lfoat reading = analo- UNIDENTIFIED BY THE TOOL
gRead(LM35);
1X:client.println(”HTTP/1.1 200 1X:client.println(”HTTP/1.1 200
OK”); OK”);
1X:client.println(”Content-Type: 1X:client.println(”Content-Type:
text/html”); text/html”);
1X:client.println(””); UNIDENTIFIED BY THE TOOL
1X: client.println(”&lt;!DOCTYPE 1X: client.println(”&lt;!DOCTYPE
HTML&gt;”); HTML&gt;”);
1X: client.println(”&lt;html&gt;”); 1X: client.println(”&lt;html&gt;”);
1X:client.print(”Celcius tempera- 1X:client.print(”Celcius
temperature =”); ture =”);
1X:client.print(temperatureC); 1X:client.print(temperatureC);
1X:client.println(”Farenheight tem- 1X:client.println(”Farenheight
temperature =”); perature =”);
1X:client.print(temperatureF); 1X:client.print(temperatureF);
1X:client.println(”Updated”); 1X:client.println(”Updated”);
1X: client.print(”Not Updated”); 1X: client.print(”Not Updated”);
1X:client.println(”&lt;br&gt;&lt;br&gt;”); 1X:client.println(”&lt;br&gt;&lt;br&gt;”);
1X:client.println(”&lt;a 1X:client.println(”&lt;a
href=/̈Tem=ON̈̈ &gt;&lt;button&gt;Update href=/̈Tem=ON̈̈ &gt;&lt;button&gt;Update
Temperature&lt;/button&gt;&lt;/a&gt;&lt;br Temperature&lt;/button&gt;&lt;/a&gt;&lt;br
/&gt;”); /&gt;”);
1X:client.println(”&lt;/html&gt;”); 1X:client.println(”&lt;/html&gt;”);
1X:delay(1); 1X:delay(1);
1X:Serial.println(”Client dison- 1X:Serial.println(”Client
disonnected”); nected”);
1X:Serial.println(””); 1X:Serial.println(””);</p>
        <sec id="sec-4-3-1">
          <title>Functional processes</title>
        </sec>
        <sec id="sec-4-3-2">
          <title>Setup() loop() Total Functional Size of the software</title>
        </sec>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>5. Conclusion</title>
      <p>The Internet of Things (IoT) is a collection of Edge devices interconnected via the internet. Edge
devices process data in real-time close to the physical environment in which they are deployed.
Functional Size Measurement is an omnipotent tool to measure functionality provided by a
software and obtain technical indicators early in the design phase.</p>
      <p>
        This paper presented a prototype tool to automate the COSMIC Functional size measurement
of IoT Edge devices. The measurement automation is based on the rules proposed in [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]. The
prototype tool proposed has two modules. The first Module is responsible for retrieving the
source code from the IoT Edge device. The second Module measures automatically the COMSIC
functional size of the source code retrieved. Four diferent approaches were proposed and
discussed to automatically retrieve the source code from the IoT Edge device. Some approaches
are more adapted to Arduino platforms and others could be used with ESP platforms.
Tests of the prototype tool proposed were carried out to validate its functionality: the tool was
ifrst tested of a very simple Arduino example with an accuracy of 100% and next it was tested
on an ESP based real-life example with an accuracy of 93.4%.
      </p>
      <p>
        In the future, we intend to improve Module 2 by including more Arduino and ESP libraries to
the measurement rules to identify the Data movements concerned and measure their size in
CFP accordingly. In addition, a more user-friendly interface for our JavaScript client will be
proposed by integrating it to the tool proposed in [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ].
      </p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <surname>Abran</surname>
          </string-name>
          , Alain, Charles Symons, Christof Ebert, Frank Vogelezang, and Hassan Soubra. ”
          <article-title>Measurement of software size: Contributions of cosmic to estimation improvements</article-title>
          .” In The International Training Symposium, At Marriott Bristol, United Kingdom, pp.
          <fpage>259</fpage>
          -
          <lpage>267</lpage>
          .
          <year>2016</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <surname>Soubra</surname>
          </string-name>
          , Hassan and Abran, Alain, ”
          <article-title>Functional size measurement for the internet of things (IoT) an example using COSMIC and the arduino open-source platform</article-title>
          .
          <source>” Proceedings of the 27th International Workshop on Software Measurement and 12th International Conference on Software Process and Product Measurement</source>
          .
          <year>2017</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <surname>Soubra</surname>
            , Hassan, Laury Jacot and
            <given-names>Steven</given-names>
          </string-name>
          <string-name>
            <surname>Lemaire</surname>
          </string-name>
          .
          <source>Manual and automated Functional Size Measurement of an aerospace Realtime Embedded system: a case study based on SCADE and on COSMIC ISO 19761</source>
          .
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>H.</given-names>
            <surname>Soubra</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Abran</surname>
          </string-name>
          , and
          <string-name>
            <given-names>M.</given-names>
            <surname>Sehit</surname>
          </string-name>
          ,
          <article-title>Functional Size Measurement for Processor Load Estimation in</article-title>
          AUTOSAR, Springer International Publishing (Switzerland),
          <source>Lecture Notes on Business Information Processing - LNBIP230</source>
          , pp.
          <fpage>1</fpage>
          -
          <lpage>16</lpage>
          ,
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>K.</given-names>
            <surname>Khattab</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Elsayed</surname>
          </string-name>
          , and
          <string-name>
            <given-names>H.</given-names>
            <surname>Soubra</surname>
          </string-name>
          ,
          <source>Functional Size Measurement of Quantum Computers Software, in: Proceedings of the 31st IWSM-Mensura</source>
          , Izmir, Turkey,
          <year>2022</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <surname>Soubra</surname>
            , Hassan,
            <given-names>Yomna</given-names>
          </string-name>
          <string-name>
            <surname>Abufrikha</surname>
          </string-name>
          , and Alain Abran. ”
          <article-title>Towards Universal COSMIC Size Measurement Automation</article-title>
          .”
          <string-name>
            <surname>In</surname>
            <given-names>IWSM</given-names>
          </string-name>
          -Mensura.
          <year>2020</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <surname>Darwish</surname>
          </string-name>
          , Ahmed, and Hassan Soubra. ”
          <article-title>COSMIC Functional Size of ARM Assembly Programs</article-title>
          .”
          <string-name>
            <surname>In</surname>
            <given-names>IWSM</given-names>
          </string-name>
          -Mensura.
          <year>2020</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>H.</given-names>
            <surname>Soubra</surname>
          </string-name>
          ,
          <article-title>Towards Universal IoT Metrics Automation</article-title>
          ,
          <source>in: Proceedings of the 31st IWSMMensura</source>
          , Izmir, Turkey,
          <year>2022</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <surname>Moulla</surname>
            ,
            <given-names>Donatien</given-names>
          </string-name>
          <string-name>
            <surname>Koulla</surname>
            , Ernest Mnkandla, and
            <given-names>Alain</given-names>
          </string-name>
          <string-name>
            <surname>Abran</surname>
          </string-name>
          .
          <source>Systematic Literature Review of IoT Metrics. Applied Computer Science</source>
          <volume>19</volume>
          (
          <issue>1</issue>
          ),
          <fpage>64</fpage>
          -
          <lpage>81</lpage>
          . https://doi.org/10.35784/acs-2023
          <source>- 05</source>
          .
          <year>2023</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>[10] https://www.engineersgarage.com/lm35-with-nodemcu/.</mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <surname>Soubra</surname>
            , Hassan,
            <given-names>Alain</given-names>
          </string-name>
          <string-name>
            <surname>Abran</surname>
          </string-name>
          , and
          <string-name>
            <surname>Amar</surname>
          </string-name>
          Ramdane-Cherif.
          <article-title>”Verifying the accuracy of automation tools for the measurement of software with COSMIC-ISO 19761 including an AUTOSAR-based example and a case study</article-title>
          .”
          <source>In 2014 Joint Conference of the International Workshop on Software Measurement and the International Conference on Software Process and Product Measurement</source>
          , pp.
          <fpage>23</fpage>
          -
          <lpage>31</lpage>
          . IEEE,
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>