| Real Time Model | These files are generated from the model's parts and connections. They implement the model's logic and are used to build the real time kernel module, userspace model and userspace library. |
| Model Data Communications | Configuration files used by follow on build tools. Files have all EPICS, and DAQ channels listed. |
| Filter Configuration | File that stores the Foton IIR filter definition file. |
| Diagnostic Files | Files that list part connections generated from the model file. |
| Model GUI Files | MEDM `.adl` files that are used to display model information in MEDM screens. |
| Global Data Communications | The `<IFO>.ipc` file is global to all models build for an IFO. It stores the IPC sender and receiver information for all models built. |
## RGC Operation
## RGC Operation
The RCG works by parsing the model's `.mdl` file and flattening all the subsystems into one top level subsystem part. It then does part connection verification, like verifying parts that need ground inputs have them, and that all parts that need input connections are connected. It also replaces buses and `goto` links with the actual parts connected. It then verifies that connections are configured correctly, and will generate errors if any problems are found. Parts are then iterated over and code is generated for each one. The way that this works is that each cdsPart has an associated perl script/object with defined methods that return the code skeleton for that part.
The RCG works by parsing the model's `.mdl` file and flattening all the subsystems into one top level subsystem part. It then does part connection verification, like verifying parts that need ground inputs have them, and that all parts that need input connections are connected. It also replaces buses and `goto` links with the actual parts connected. It then verifies that connections are configured correctly, and will generate errors if any problems are found. Parts are then iterated over and code is generated for each one. The way that this works is that each cdsPart has an associated perl script/object with defined methods that return the code skeleton for that part.
...
@@ -18,12 +29,22 @@ The RCG works by parsing the model's `.mdl` file and flattening all the subsyste
...
@@ -18,12 +29,22 @@ The RCG works by parsing the model's `.mdl` file and flattening all the subsyste
| `fromExp` | Returns the variable where the input of this part comes from. |
| `fromExp` | Returns the variable where the input of this part comes from. |
| `frontEndCode` | Returns the code that is run each cycle to preform the function of the part. |
| `frontEndCode` | Returns the code that is run each cycle to preform the function of the part. |
## Main Build Products
Using these methods the RCG generates the expected build products. The output below is an example of what gets generate for a simple operation for the real time model.
| Name | Purpose |
| ------ | ------ |
### Simulink Input
| Real Time Model | These files are generated from the model's parts and connections. They implement the model's logic and are used to build the real time kernel module, userspace model and userspace library. |
| Model Data Communications | Configuration files used by follow on build tools. Files have all EPICS, and DAQ channels listed. |
| Filter Configuration | File that stores the Foton IIR filter definition file. |
### Real Time Model Output
| Diagnostic Files | Files that list part connections generated from the model file. |
```c
| Model GUI Files | MEDM `.adl` files that are used to display model information in MEDM screens. |
...
| Global Data Communications | The `<IFO>.ipc` file is global to all models build for an IFO. It stores the IPC sender and receiver information for all models built. |