![]() |
VSM C++ SDK
Vehicle Specific Modules SDK
|
Handles interactions with CUCS. More...
#include <cucs_processor.h>
Public Types | |
typedef std::shared_ptr < Cucs_processor > | Ptr |
Pointer type. | |
typedef std::weak_ptr < Cucs_processor > | Weak_ptr |
Pointer type. | |
![]() | |
typedef std::shared_ptr < Request_context > | Ptr |
Pointer type. | |
typedef std::weak_ptr < Request_context > | Weak_ptr |
Pointer type. | |
![]() | |
enum | Type { Type::NONE = 0x0, Type::PROCESSOR = 0x1, Type::COMPLETION_CONTEXT = 0x2, Type::ANY = PROCESSOR | COMPLETION_CONTEXT, Type::TEMPORAL = 0x4, Type::TEMP_COMPLETION_CONTEXT = COMPLETION_CONTEXT | TEMPORAL } |
Container type. More... | |
typedef std::shared_ptr < Request_container > | Ptr |
Pointer type. | |
typedef std::weak_ptr < Request_container > | Weak_ptr |
Pointer type. | |
Public Member Functions | |
Cucs_processor () | |
Default constructor. | |
void | Register_device (Device::Ptr) |
Registration of a vehicle instance in the processor. More... | |
void | Unregister_device (uint32_t handle) |
Unregistration of a vehicle instance in the processor. More... | |
void | Send_ucs_message (uint32_t handle, Proto_msg_ptr message, uint32_t stream_id=0) |
![]() | |
virtual Type | Get_type () const override |
Get this container type. More... | |
![]() | |
Request_container (const std::string &name, Request_waiter::Ptr waiter=Request_waiter::Create()) | |
Create container with default associated waiter. More... | |
bool | Check_type (Type mask) |
Check if the container type conforms the specified characteristic mask. More... | |
void | Submit_request (Request::Ptr request) |
Submit request to this container for further processing or notification handlers invocation. More... | |
void | Submit_request_locked (Request::Ptr request, Request_waiter::Locker locker) |
The same as Submit_request, but with previously acquired lock of the associated waiter. More... | |
int | Process_requests (int requests_limit=0) |
Process all currently queued requests. More... | |
int | Process_requests (std::unique_lock< std::mutex > &lock, int requests_limit=0) |
Process all currently queued requests. More... | |
void | Set_waiter (Request_waiter::Ptr waiter) |
Set request waiter associated with this container. More... | |
Request_waiter::Ptr | Get_waiter () const |
Get request waiter associated with this container. More... | |
const std::string & | Get_name () |
Get the name of the container. More... | |
void | Enable () |
Enable the container. More... | |
void | Disable () |
Disable the container. More... | |
bool | Is_enabled () const |
Check if the container is currently enabled. More... | |
Static Public Member Functions | |
template<typename... Args> | |
static Ptr | Create (Args &&...args) |
Create an instance. More... | |
template<typename... Args> | |
static Ptr | Get_instance (Args &&...args) |
Get global or create new processor instance. More... | |
![]() | |
template<typename... Args> | |
static Ptr | Create (Args &&...args) |
Create an instance. More... | |
![]() | |
template<typename... Args> | |
static Ptr | Create (Args &&...args) |
Create an instance. More... | |
Static Public Attributes | |
static constexpr uint32_t | SUPPORTED_UCS_VERSION_MAJOR = 2 |
static constexpr uint32_t | SUPPORTED_UCS_VERSION_MINOR = 14 |
Additional Inherited Members | |
![]() | |
void | Processing_loop () |
Request processing loop implementation. More... | |
void | Set_disabled () |
Disable the container and notify its waiter. More... | |
virtual void | On_wait_and_process () |
Called when default processing loop want to wait for work and process it. More... | |
![]() | |
Request_waiter::Ptr | waiter |
Waiter associated with this container. More... | |
std::list< Request::Ptr > | request_queue |
Queue of pending requests, i.e. More... | |
Handles interactions with CUCS.
Intermediate version.
|
inlinestatic |
Create an instance.
|
inlinestatic |
Get global or create new processor instance.
void ugcs::vsm::Cucs_processor::Register_device | ( | Device::Ptr | ) |
Registration of a vehicle instance in the processor.
Returns only when device registration has completed.
void ugcs::vsm::Cucs_processor::Unregister_device | ( | uint32_t | handle | ) |
Unregistration of a vehicle instance in the processor.