AUTOSAR: Obtaining Application SWC-ID and Runnable ID at runtime - embedded

This pertains to the classic platform. An on-chip accelerator that we are developing, will host software that will be requested for execution remotely by application SWC running on host processor.
An AUTOSAR complex device driver is being conceptualized in order to serve as gateway to the accelerator software. This complex device driver will receive requests from runnables of various application SWC, pass on the request to accelerator, receive response from accelerator and send it (response) back to requesting application SWC.
In order to be able to distinguish themselves uniquely, am planning to have the runnables submit their SWC-ID and Runnable ID to the complex driver as part of the request data.
Question therefore is "Can the runnables determine their SWC-ID and Runnable ID at runtime (e.g. By invoking a RTE API)"?
Alternatively, how can the complex device driver determine the credentials of a requester?

I suggest you to have a look at the PortDefinedArgumentValue feature (SoftwareComponentTemplate chapter "7.6.3 Port Defined Argument Value"). With that you can annotate an id for each port which is then passed to the runnable.

Related

how to generate HID get/set report requests to test a new usb device

I want to test my usb device firmware. I'm looking for a host tool to generate get/set reports to exercise my USB device. Handling INPUT requests and generating OUTPUT requests would be a bonus.
Are there any generic tools to send a USB message? Any python tools to recommend?
It seems like a pretty generic need but I havent found much in my web searches.

Send and receive iot-hub messages

I am working on a project based on the azure sphere kit where I want to control a motor from a web application. I managed to send the command to the iot hub and the build in monitor shows that the message is received by the iot hub. Now, my question is: How can I forward this message to the board? I have to mention that this is my first experience with the iot-hub so please dont judge me if it is a stupid question.:) Here is the confirmation that the message is received by the iothub
If you want to communicate with your Azure Sphere from Azure IoT Hub, you're talking about Cloud-to-device communication. There are three different ways to do this communication:
Direct Methods
Device Twin Desired Properties
Cloud-to-device (C2D) messages
Microsoft documented them here. This document also lists the different considerations for each of the three methods.
To forward the IoT Hub message that you mentioned in your question, a good start would be to write an Azure Function that listens to the IoT Hub output and send that to the device using one of the three methods above. You can find an example for the Azure Function IoT Hub trigger here
Adding few more detailed options in this scenario to the above responses.
Scenario 1: You may be interested in configuring your devices from your back-end service(s) as your web application. To synchronize state information between a device and an IoT hub, you use device twins. A desired property is set by a back-end application and read by a device. A reported property is set by a device and read by a back-end application. A tag is set by a back-end application and is never sent to a device. You use tags to organize your devices. Long-running commands intended to put the device into a certain desired state. For example, set the telemetry send interval to 30 minutes. This completes your E2E state synchronization scenario : Web-Application<=>IoT Device, Ref Link
Question: How can I forward this message to the board?
Scenario 2: You may be interested in direct method to control a device connected to your IoT hub. You can use direct methods to remotely change the behavior of devices connected to your IoT hub. Commands that require immediate confirmation, such as turning on a fan.
Requirements:
-->IoT Device: To receive the direct method calls, the applications running on IoT Device connect to a device-specific endpoint on your IoT hub.
HostName={YourIoTHubName}.azure-devices.net;DeviceId=MyNodeDevice;SharedAccessKey={YourSharedAccessKey}
-->Web-Application: To call a direct method on a device, your Web application connects to service-side endpoint on your IoT hub.
HostName={YourIoTHubName}.azure-devices.net;SharedAccessKeyName=service;SharedAccessKey={YourSharedAccessKey}
Direct Method calls: Points to be noted. Please visit the link: detailed comparison of the various cloud-to-device communication options.
The maximum direct method payload size is 128 KB.
Disconnected devices are not contacted. The solution back end is notified that the device is not connected.
Ref Link
If you need further help in this matter, please comment in the below section and we will be happy to help you on this forum.

Writing an API to Interact with my own custom hardware?

Suppose I've a custom made hardware which is connected to the computer. I've my drivers installed to communicate with the hardware.Then how can I write an API through which i can access my hardware programmatically(As an example consider accessing oculus rift head mounted device using OculusSDK).Specifically how do i make my API communicate with device drivers to access the hardware using system call interface? If possible explain with an example.
Your hardware driver should implement a way of interracting with user.
E.g., it can be special file(s), which user can open (using standard open(2)) and then call read/write/mmap/ioctl for it. Each such operation actually triggers some driver code, which in case triggers some hardware request.

Load testing: Choosing between a tool or simulating clients on my own for this scenario?

I want to load test my application and I'm deciding b/w choosing a load testing service or simulating the clients on my own.
My question is whether I can accomplish this user scenario using any of the load testing tools available.
My test will have two types of users, A & B. Communication would be between A and B. A-A communication and B-B communication is not there.
I want Users to login to my application through mobile or web. Either type of users could log in through either type of platform.
Make multiple GET/PUT/POST requests to my application server with specific parameters.
Be able to exchange video or text messages by integrating through services like Pusher and Vidyo.
'3' is probably the most important requirement for me, and I'm wondering if I could simulate the dummy users so that it listens to a pusher channel and can open up a Vidyo iframe in the emulated browser / mobile device for a specific pusher message?
I got on call with Blazemeter and turns out they or anyone in the market doesn't support plugins on emulated browsers. I finally simulated the clients on my own replicating all the server calls a typical browser or mobile device makes for my application.
I haven't yet been able to load test Vidyo and don't know if there's a way to do it except by opening up conferences manually.
I was able to load test services like Pusher and SQS successfully.

Is there an open source .NET Message Bus for Windows App to Service App?

I have a Windows Application (GUI updates database which service uses, GUI gets information from service) and a Windows Service (Does the gruntwork). Both projects are vb.net. I would like to be able to pass information back and forth in a message bus style.. The following are the types of information transfers I would have at minimum:
Statuses - i.e., Service sends several system statuses for the Windows Application to display on a sort of 'Digital Dashboard' Main dislplay
Metrics - i.e., Service sends several metrics (failure counts, success counts, and others)
Configuration Reload - The Windows Application would send a command to reload the configuration settings to the service (that way the service doesn't have to continuously query the database for settings.
allow for cross computer information transfer, if possible (i.e., using TCP Ports or whatever methodology allows for this)
Simplicity would help :)
Thanks in advance.
ZeroMQ will do this - written in C for low-level network performance, it has C# bindings (and every example has code for all the languages it supports, that's pretty cool).