NM coordinator functionality implementation - shutdown

Could anyone tell me
is it necessary to have Bus Nm implemented for every bus in a NM coordinator cluster??
is it possible for synchronised wakeup by NM coordinator??
I have a situation
In my project Flexray and Can networks are implemented.
Flexray has FrNm but CAN doesnt have CANNM module implemented.
CAN is currently handled only via ComM users for example IGK
Requirement is to activate CAN communication even when there is a passive wake up on Fr bus.
Is this scenario can be achieved by
Nm coordinator functioanlity???

Related

Is there a formal way to zeroize in CANopen

I have a system with multiple subsystems communicating with CANOpen. There is a main unit with a screen (for men-machine interface and stuff) and sub-units for minor operations(like sample button status, manage power, take measurements...).
We defined a CANOpen based communication protocol for this system. Subsystems share their conditions periodically with TPDO messages and do stuff according to main unit's commands sent with RPDO messages. And also some NMTs are in use too.
So I've been asked to add a new command to this protocol, zeroize. This command shall be sent broadcast and it shall cause everybody to delete softwares. What is the right way to do this?
Maybe I can use a RPDO? Are we allowed to define new NMT commands in CANopen? Maybe I can do it with NMT but by using a new commandt hat is not in use already?
Thanks in advance
Ip.
It is a bit confusing what you mean with TPDO and RPDO since the main unit's TPDO is going to be the peripheral units' RPDO and vice versa. But yes, the correct way to send out some custom broadcast message would be with a PDO.
Although, depending on what you mean with "delete software", CANopen might provide a mean for it. There are the save (OD 1010h) and load (OD 1011h) registers in the object dictionary. Save is to be used for the purpose of storing all CANopen communication (PDO configuration, mapping etc) in non-volatile memory. And load is used to restore CANopen parameters to factory defaults. These should however not be used to save/load application-specific settings.
You are not allowed to define new NMT commands.
Objects 1010h and 1011h can be used to reset the values in the object dictionary. If you really want to delete the software, the firmware upgrade protocol from CiA 302-3 might help. Writing 00h (Stop program) followed by 03h (Clear program) to object 1F51h sub-index 1 on the slave will delete the application. Whether it's actually "zeroed out" depends on the implementation. You'll need two SDO requests per slave for this though. The standard specifies that object 1F51h cannot be PDO mapped. Although that requirement may not be enforced for your devices, in which case you could achieve broadcast "zeroing" with two PDOs.

Emit D-Bus signal using GDBus without owning a well-known name

I would like to use dbus to signal other instances of the same family of applications.
It seems that to issue a signal I must execute a g_bus_own_name, emit the signal when the name is acquired, then g_bus_unown_name.
This seems like a bit of palava just to send a signal.
When the name is acquired, another instance of the application will hang waiting for this instance to 'unown' the name.
The deprecated way of dbus_message_new_signal/dbus_connection_send was much more straight forward.
Is there a simpler way to send the signal (without owning the name).
Yes, as Michael K says, use g_dbus_connection_emit_signal(). You only have to own a well-known name if you want other users of the bus to be able to address your application by that well-known name, rather than a unique name which changes every time you connect to the bus.

Is it possible to read VIN from CAN data?

Will VIN information be available from CAN data? Does any ECUs are module broadcasts VIN information on CAN channel?
You can read the VIN using OBD-II mode 0x9 PID 0x2, other than that, it is mainly implementation dependant. Many vendors broadcast the VIN every second or so, many times from the BCM (body control module) but it varies from vendor to vendor, and may not be happening at all.
Any car that supports CAN has a method of getting the VIN, either through TP2.0 or UDS. Is there a certain car that you're trying to communicate with?

CoreMidi and external USB controller

I 'm using coremidi all right, but I want to also support an external USB function.
I 've tried an app called Midi Monitor which indeed finds my USB interface when connected.
The problem is how to enable this interface through my own app. As said in MIDIGetNumberOfExternalDevices documentation, "Their presence is completely optional, only when a UI (such as Audio MIDI Setup) adds them."
How am I supposed to add them?
Best Regards.
"External devices" are not what you want. Those are the things that a user can create in Audio MIDI Setup in OS X, to represent a synthesizer or keyboard or other device that is connected to the computer via a MIDI cable. The system does not automatically create them. (It can't, because MIDI is terribly primitive and has no device discovery protocol.)
External devices are only for the user's benefit in naming and arranging things. They can't be used to do MIDI input or output. They're especially useless in iOS, since there's no Audio MIDI Setup app.
Instead, use MIDIGetNumberOfSources and MIDIGetSource to find sources of MIDI data.
To actually get input, use MIDIInputPortCreate to create an input port, then MIDIPortConnectSource to connect one or more sources to that port. Then your port's MIDIReadProc will be called when MIDI comes in.
Similarly, for output, you would use MIDIGetNumberOfDestinations and MIDIGetDestination to find destinations, create an output port using MIDIOutputPortCreate, and MIDISend to send data through a port to a destination.
For reference, see the MIDIServices documentation.

how to scale an application with web interface in erlang

Lately I have seen many projects which have a web interface and backend in erlang (e.g. flash games on fb or similar).
I was wondering something like that (maybe simpler) could be implemented.
I believe they have an erlang application to provide authentication, and another one to provide routing to the actual game. But then, how do they start a new instance of the game application for each different user? Maybe they create a new node and start the application there? Can you provide me some insight?
Using the actor model you create a process for each connected player which reacts to messages from the Flash client, sends messages either directly to other player processes or to a central process handling global state. This player process reacts to messages from other players as well and send updates back to the client.
You may then build your system architecture upon this idea. Maybe you have multiple central processes which handles different parts of the game. Maybe you let players be split between different "rooms" where each room is its own process. Maybe you have one player process which is active even when the player is disconnected, or maybe you just queue messages and react to them when the player returns. The architecture will of course largely depend upon the type of game you are building.

Resources