How can I verify CAN message ID received in CANoe against DBC file using CAPL? - can-bus

I did similar with message DLC using predefined function ChkCreate_InconsistentDLC. Looking for options to do the same for message ID.
I have been trying to find some predefined function.

Related

Is there a method in quickfix for returning execution report acknowledgement message?

I have initiator and acceptor applications in Java. I'm using FIX 4.2 protocol.
I'm sending Execution Reports via acceptor and getting them with initiator. There's no problem in here. What I need is, return an execution report acknowledgement message(type: BN) for the acceptor. In FIX 4.2 standarts there are no BN messages. I will probably add those fields to datadictionary myself.
I checked user manual of quickfix. There are some example methods for sending messages.
void sendOrderCancelRequest() throws SessionNotFound
{
quickfix.fix41.OrderCancelRequest message = new quickfix.fix41.OrderCancelRequest(
new OrigClOrdID("123"),
new ClOrdID("321"),
new Symbol("LNUX"),
new Side(Side.BUY));
message.set(new Text("Cancel My Order!"));
Session.sendToTarget(message, "TW", "TARGET");
}
Should i write a method like above and call it inside of onMessage method? How can I response these messages?
QF does not automatically do this for you.
You will need to implement your own logic to create the ack message and send it.
And yes, you are correct that you will need to add BN and its fields to your DataDictionary. I would then recommend that you re-generate the QF/j source and rebuild the library so that you can have proper BN message/field classes. (The QF/j documentation should be able to guide you with this.)

IFTTT Applet not working

I have created a If This Then That applet whiche reads as follows:
If new feed item matches 'Lecturer:' from https://dedekindsarmy.github.io/feed.xml, then send a direct message to #dedekindsarmy
However, I published a trial post in my feed which includes in the description the Lecturer: substring and nothing happened.
How do I fix it?

How to validate a message in pcap?

I have a requirement to expand required tree in decoded parameters of pcap file and validate a message in it.
Example:
Open "Transmission Control Protocol" as shown in screenshot and and validate for the message "This is an ACK to the segment in frame: 278".
Need to develop an automation script in Java for validating messages in pcap files . Currently am using jnetpcap lib.
Appreciate your inputs!.
You can't, without protocol analysis by yourself. A pcap file doesn't include such massages.
The message "This is an ACK to the segment in frame: 278" was generated by wireshark after TCP session analysis by itself. Even the frame number 278 was assigned by wireshark. A pcap file only contains packets' data.

change trace log format in emqtt message broker

I am using emqtt message broker for mqtt.
I am not a erlang developer and has zero knowledge on that.
I have used this erlang based broker, because after searching many open source broker online and suggestions from people about the advantage of erlang based server.
Now i am kind of stuck with the out put of the emqttd_cli trace command.
Its not json type and if i use a perl parser to convert to json type i am getting delayed output.
I want to know, in which file i could change the trace log output format.
I looked on the trace code of the broker and found a file src/emqttd_protocol.erl. An exported function named trace/3 has the code that you need.
Second argument of this function, named Packet, has the information of receive & send data via broker. You can fetch required data from it and format according to how you want to print.
Edit : Sample modified code added
trace(recv, Packet, ProtoState) ->
PacketHeader = Packet#mqtt_packet.header,
HostInfo = esockd_net:format(ProtoState#proto_state.peername),
%% PacketInfo = {ClientId, Username, ClientIP, ClientPort, Payload, QoS, Retain}
PacketInfo = {ProtoState#proto_state.client_id, ProtoState#proto_state.username, lists:nth(1, HostInfo), lists:nth(3, HostInfo), Packet#mqtt_packet.payload, PacketHeader#mqtt_packet_header.qos, PacketHeader#mqtt_packet_header.retain},
?LOG(info, "Data Received ~s", [PacketInfo], ProtoState);

How to display message at the bottom of a display file in CL program?

Suppose a display file has been declared in a CL program. It accepts some user input and conducts some validations to it. If it fails the validation a message would be displayed on the bottom of the display file. Is it possible to achieve this in CL? I have tried SNDPGMMSG with MSGTYPE(*DIAG), but the message is displayed only after the program has been terminated, and not on the display file during the execution.
The message to be sent is retrieved from message file so using field to display message is not applicable.
Normally we use message subfile to achive what you required above.
It can be done in display file for both CL and RPG
For CL example, you could read here http://www.mcpressonline.com/cl/the-cl-corner-letting-the-user-know-what-s-right-and-wrong.html.
You could search for "cl program message subfile" for other examples
Define a 75 character field in your display file DDS. Call it MESSAGE. In your CL do something like:
if (&option *ge '35') do
CHGVAR &MESSAGE 'Invalid option chosen'
goto getOption
enddo

Resources