Base API message class

ApiMsg


Virtually all Plegma API messages inherit from this ApiMsg abstract class:

    
namespace Yodiwo.API.Plegma
{
  public abstract class ApiMsg
  {
    public int SeqNo;
  }
}
    

This base class contains just the sequence number of the message:

Suffixes in all Plegma API messages provide information about the kind of message. In message and with a singular exception, all messages are blocking ones and expect a response, even if the latter is a generic “ack”-type one.

 Node-to-Cloud RPC
You can also use RPC mechanisms towards our Cloud servers. Take a look at the reference RPC-over-MQTT example source code that you’ll find in our github page
 Synchronous requests

For protocols that do not inherently support synchronous, blocking calls (like MQTT) or , implementation of a synchronous Req/Rsp mechanism is left to a protocol wrapper instead. For more information have a look at the respective protocol help sections

GenericRsp


As mentioned, synchronous request-type messages require responses, and sometimes those are generic ACK-type response that offer little more than confirmation of whether a message was successfully parsed. For those there is the GenericRsp message:

    
package com.yodiwo.PlegmaApi;

public abstract class ApiMsg {
    public int SeqNo;
}