You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs.openc3.com/docs/configuration/interfaces.md
+13-2Lines changed: 13 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -666,7 +666,18 @@ For a full example, please see the [openc3-cosmos-proto-target](https://github.c
666
666
667
667
## Custom Interfaces
668
668
669
-
Interfaces have the following methods that must be implemented:
669
+
Custom interfaces should be created in the `lib/` folder of your plugin and then referenced in `plugin.txt` simply by the file name, no pathing necessary.
All interfaces must be subclasses of the `Cosmos::Interface` class or one of its subclasses. Interfaces have the following methods that must be implemented:
670
681
671
682
1.**connect** - Open the socket or port or somehow establish the connection to the target. Note: This method may not block indefinitely. Be sure to call super() in your implementation.
672
683
1.**connected?** - Return true or false depending on the connection state. Note: This method should return immediately.
@@ -683,5 +694,5 @@ Interfaces also have the following methods that exist and have default implement
683
694
1.**write_raw** - Send a raw binary string of data to the target. COSMOS implements this method by basically calling write_interface with the raw data.
684
695
685
696
:::warning Naming Conventions
686
-
When creating your own interfaces, in most cases they will be subclasses of one of the built-in interfaces described below. It is important to know that both the filename and class name of the interface files must match with correct capitalization or you will receive "class not found" errors when trying to load your new interface. For example, an interface file called labview_interface.rb must contain the class LabviewInterface. If the class was named, LabVIEWInterface, for example, COSMOS would not be able to find the class because of the unexpected capitalization.
697
+
When creating your own interfaces, in most cases they will be subclasses of one of the built-in interfaces described above. It is important to know that both the filename and class name of the interface files must match with correct capitalization or you will receive "class not found" errors when trying to load your new interface. For example, an interface file called labview_interface.rb must contain the class LabviewInterface. If the class was named, LabVIEWInterface, for example, COSMOS would not be able to find the class because of the unexpected capitalization.
Copy file name to clipboardExpand all lines: openc3-cosmos-init/plugins/packages/openc3-cosmos-tool-packetviewer/src/tools/PacketViewer/PacketViewer.vue
0 commit comments