## 3 Problem Definition
The proposed model ensures that whenever a vehicle or any network element needs to transfer critical information, a free and synchronous channel is always available. This channel guarantees a constant transmission rate with minimal transmission delay and limited delay variation between entities, ensuring reliable and efficient communications. This synchronous flow of control data establishes a service channel, defined as a TSN unidirectional transmission of data frames from a source device, referred to as a _talker_, to a destination device, referred to as a _listener_. Connections between RSCEs and their corresponding service providers managing the TMS are assumed to facilitate the exchange of control data. These data must adhere to strict delivery requirements, including maximum delay and jitter bounds. These connections are periodic and have fixed frame sizes. A service request sent from an end device, such as a TFC or a TMS, to the CUC  
Figure 2: Proposed architecture for the next generation of smart roadside infrastructure. module is based on a tuple: (\(R_{src}\), \(R_{dst}\), \(R_{len}\), \(R_{prd}\), \(R_{delay}\)). For each parameter in this tuple, the following assumptions are made:  
* \(R_{src}\) and \(R_{dst}\) are integer identifiers for the TFCs and TMS where the source and destination devices are directly connected, with \(R_{src},R_{dst}\in\{0,...,V\}\). * \(R_{len}\) represents the frame size in bytes, with possible values \(R_{len}\in\{128,256,512,1024,1500\}\). * \(R_{prd}\) is the frame transmission period in milliseconds, with \(R_{prd}\in\{2,4,8,16\}\). * \(R_{delay}\) is the maximum acceptable end-to-end delay in milliseconds, with \(R_{delay}\in\{20,23,26,29\}\). The proposed scenario is inspired by a subset of streets and crossroads of downtown Barcelona. Then, the service requests that are randomly generated are based on information about aggregated traffic. Moreover, some concepts related to time division and link scheduling are defined. Since data frames are sent periodically, the scheduling of frames is also periodic. Given the multiple possible period values, the overall period, referred to as the _hyperperiod_, is the least common multiple (LCM) of all period values. The data flow scheduling along a hyperperiod follows a consistent pattern unless a new service request is received or an existing connection stops sending frames. The hyperperiod is divided into equally long slots of 100 microseconds, referred to as the _slot time_). Assuming that all network links operate at 1 Gbps, it is possible to transmit 12,500 bytes in each slot, which is termed the _slot size_). These concepts--hyperperiod, slot time, and slot size--are illustrated in Figure 4.  
Figure 3: Simulation scenario consisting of a set of TSN switches located in the TFC and TMS entities connected by unidirectional fixed network links that make up a service area of several service providers. To simplify the scheduling of data flows with specific periodicities, we introduce the concept of _positions_, which represent groups of slots that can be used for transmitting a data flow. If the hyperperiod is divided into groups of \(R_{prd}/slot_{time}\) slots, the total duration of each group is equal to \(R_{prd}\). A data flow whose periodicity is \(R_{prd}\) can be transmitted by selecting the same time-ordered slot within each group. These positions satisfy the following property: their slots are equally spaced by \(R_{prd}\) milliseconds. As a result, selecting a single position ensures that the periodicity between consecutive data frames is maintained within the time duration of a slot, providing a straightforward and consistent mechanism for periodic data flow scheduling. The definition of positions depends on the period of the service request, meaning that the number of possible positions for scheduling frames is different with each \(R_{prd}\) value.