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
String classes like TlmString and LogString appear in the auto-generated C++ component interface. For example, to pass a string argument to an event you have to pass a reference to LogString.
Based on a discussion with @timcanham and @LeStarch, these string classes provide a global truncation parameter. For example, requiring the user to store an event string argument in LogString ensures that the serialized string length is bounded by the minimum of (1) the size declared in the event specifier and (2) the max size of LogString.
As described in #406, we can have the auto-generated code truncate an arbitrary string directly to the min of the two sizes when serializing the string. We do not need the specialized string type to do this truncation. In this approach, the interface for sending commands and events is simpler, because you can pass in any string object to a const Fw::StringBase&. You don't need to first copy your string into the specific string type.
We can use LogString, etc. internally in the generated code, e.g., when declaring auto-generated variables. However, we should eliminate these types from the user interface as much as possible. The change described here should be transparent to user code that uses LogString, etc.
Revise events
Revise telemetry
Revise parameters
Revise commands
The text was updated successfully, but these errors were encountered:
bocchino
changed the title
Remove CmdArgString, EventArgString, etc.
Remove CmdArgString, EventArgString, etc. from generated code
Apr 12, 2024
bocchino
changed the title
Remove CmdArgString, EventArgString, etc. from generated code
Remove CmdArgString, EventArgString, etc. from generated interface code
Apr 17, 2024
bocchino
changed the title
Remove CmdArgString, EventArgString, etc. from generated interface code
Remove CmdArgString, EventArgString, etc. from generated interface
Apr 17, 2024
bocchino
changed the title
Remove CmdArgString, EventArgString, etc. from generated interface
Remove CmdStringArg, LogString, etc. from generated interface
Apr 17, 2024
bocchino
changed the title
Remove CmdStringArg, LogString, etc. from generated interface
Remove TlmString, LogString, etc. from generated interface
Apr 17, 2024
String classes like TlmString and LogString appear in the auto-generated C++ component interface. For example, to pass a string argument to an event you have to pass a reference to LogString.
Based on a discussion with @timcanham and @LeStarch, these string classes provide a global truncation parameter. For example, requiring the user to store an event string argument in LogString ensures that the serialized string length is bounded by the minimum of (1) the size declared in the event specifier and (2) the max size of LogString.
As described in #406, we can have the auto-generated code truncate an arbitrary string directly to the min of the two sizes when serializing the string. We do not need the specialized string type to do this truncation. In this approach, the interface for sending commands and events is simpler, because you can pass in any string object to a
const Fw::StringBase&
. You don't need to first copy your string into the specific string type.We can use LogString, etc. internally in the generated code, e.g., when declaring auto-generated variables. However, we should eliminate these types from the user interface as much as possible. The change described here should be transparent to user code that uses LogString, etc.
The text was updated successfully, but these errors were encountered: