Firmware
|
Classes | |
class | KraitRpcWrapper |
Public Member Functions | |
AEEResult | orb_initialize () |
interface method to start the uorb service and initialize the muorb | |
AEEResult | set_absolute_time_offset (in long time_diff_us) |
Interface to set an offset to hrt_absolute_time on the DSP. More... | |
AEEResult | get_absolute_time (rout unsigned long long time_us) |
Interface to request hrt_absolute_time on the DSP. More... | |
AEEResult | param_update_to_shmem (in unsigned long param, in sequence< octet > value) |
Interface to update param for krait. More... | |
AEEResult | param_update_index_from_shmem (rout sequence< octet > data) |
Interface to update index for krait. More... | |
AEEResult | param_update_value_from_shmem (in unsigned long param, rout sequence< octet > value) |
Interface to get param value for krait. More... | |
AEEResult | topic_advertised (in string topic_name) |
Interface called from krait to inform of a published topic. More... | |
AEEResult | topic_unadvertised (in string topic_name) |
Interface called from krait to inform of a published topic. More... | |
AEEResult | add_subscriber (in string topic_name) |
Interface to add a subscriber to the identified topic. More... | |
AEEResult | remove_subscriber (in string topic_name) |
Interface to remove a subscriber for the identified topic. More... | |
AEEResult | send_topic_data (in string topic_name, in sequence< octet > data) |
Interface called from krait for topic data. More... | |
AEEResult | is_subscriber_present (in string topic_name, rout long status) |
Inteface to check if there are subscribers on the remote adsp client This inteface is required as the krait app can be restarted without adsp being re-started. More... | |
AEEResult | receive_msg (rout long msg_type, rout string topic_name, rout sequence< octet > data, rout long bytes_returned) |
Interface to receive data from adsp. More... | |
AEEResult | unblock_recieve_msg () |
Since the receive_msg is a blocking call, the client will not be able to peform a clean shutdown. More... | |
AEEResult | receive_bulk_data (rout sequence< octet > data, rout long bytes_returned, rout long topic_count) |
This interface will perform a bulk read from the adsp and return the data buffer. More... | |
AEEResult px4muorb::add_subscriber | ( | in string | topic_name | ) |
Interface to add a subscriber to the identified topic.
topic_name |
AEEResult px4muorb::get_absolute_time | ( | rout unsigned long long | time_us | ) |
Interface to request hrt_absolute_time on the DSP.
time_us | pointer to time in us |
AEEResult px4muorb::is_subscriber_present | ( | in string | topic_name, |
rout long | status | ||
) |
Inteface to check if there are subscribers on the remote adsp client This inteface is required as the krait app can be restarted without adsp being re-started.
In this scenario the krait app does not know if there is subscriber on the remote end(ie adsp).
topic_name | The name of the topic for which the subscription needs to be checked. |
rout | int status The status of the subscription, 0=no-subscribers, 1 = more than one subscriber. |
AEEResult px4muorb::param_update_index_from_shmem | ( | rout sequence< octet > | data | ) |
Interface to update index for krait.
data | param index array. |
AEEResult px4muorb::param_update_to_shmem | ( | in unsigned long | param, |
in sequence< octet > | value | ||
) |
Interface to update param for krait.
param | param index. |
value | param value. |
AEEResult px4muorb::param_update_value_from_shmem | ( | in unsigned long | param, |
rout sequence< octet > | value | ||
) |
Interface to get param value for krait.
param | param index. |
value | param value. |
AEEResult px4muorb::receive_bulk_data | ( | rout sequence< octet > | data, |
rout long | bytes_returned, | ||
rout long | topic_count | ||
) |
This interface will perform a bulk read from the adsp and return the data buffer.
The structure of the messages is as follows +-------------—+--------—+------------—+-------—+-------------—+ | Topic Name Len | datal_len |TopicName(nullterminated) | data bytes | +-------------—+--------—+------------—+-------—+-------------—+ |<– 2 bytes –>|<-2bytes-> |<– topicnamelen bytes –>|<-datalenbytes->| +-------------—+------------------------—+-------—+-------------—+
data | The output buffer where the data needs to be copied |
bytes_returned | The number of bytes the buffer is filled up by. |
topic_count | The numbe of topics filled in the buffer. |
AEEResult px4muorb::receive_msg | ( | rout long | msg_type, |
rout string | topic_name, | ||
rout sequence< octet > | data, | ||
rout long | bytes_returned | ||
) |
Interface to receive data from adsp.
Since there is only one interface, the different message types are identified by the msg_type field.
msg_type | The possible values are: 1 ==> add_subscriber 2 ==> remove_subscriber 3 ==> recieve_topic_data 4 ==> advertised_topic |
topic_name | The topic being returned. |
data | the data stream |
bytes_returned | The number of bytes returned in the byte buffer. |
AEEResult px4muorb::remove_subscriber | ( | in string | topic_name | ) |
Interface to remove a subscriber for the identified topic.
topic_name |
AEEResult px4muorb::send_topic_data | ( | in string | topic_name, |
in sequence< octet > | data | ||
) |
Interface called from krait for topic data.
topic_name | |
data | a sequence of bytes for the passed data stream. as per the HExagon Documention, the max size of this stream is 255 bytes. |
AEEResult px4muorb::set_absolute_time_offset | ( | in long | time_diff_us | ) |
Interface to set an offset to hrt_absolute_time on the DSP.
time_diff_us | time difference of the DSP clock to Linux clock. A positive number means the Linux clock is ahead of the DSP one. |
AEEResult px4muorb::topic_advertised | ( | in string | topic_name | ) |
Interface called from krait to inform of a published topic.
topic_name | name of the topic being advertised |
AEEResult px4muorb::topic_unadvertised | ( | in string | topic_name | ) |
Interface called from krait to inform of a published topic.
topic_name | name of the topic being advertised |
AEEResult px4muorb::unblock_recieve_msg | ( | ) |
Since the receive_msg is a blocking call, the client will not be able to peform a clean shutdown.
Calling this function will unblock the receive msg an return an error code. Ideally this should be implemented as a timeout for the receive_msg call.
none |