Code help rs485 non blocking library example

Hello, i am trying to implement an example code taken from Gammon Forum : Electronics : Microprocessors : RS485 communications

The blocking library has an example which sends multiple parameters to the reciever e.g

byte buf [10];
  
  byte received = recvMsg (fAvailable, fRead, buf, sizeof (buf));
  
  if (received)
    {
    if (buf [0] != 1)
      return;  // not my device
      
    if (buf [1] != 2)
      return;  // unknown command
    
    byte msg [] = {
       0,  // device 0 (master)
       3,  // turn light on command received
    };
    
    delay (1);  // give the master a moment to prepare to receive
    digitalWrite (ENABLE_PIN, HIGH);  // enable sending
    sendMsg (fWrite, msg, sizeof msg);
    digitalWrite (ENABLE_PIN, LOW);  // disable sending
    
    analogWrite (11, buf [2]);  // set light level
   }  // end if something received

However on the non-blocking library the example is much simpler:

[/code]
if (myChannel.update ())
{
Serial.write (myChannel.getData (), myChannel.getLength ());
Serial.println ();
}
[/code]

Is there a way to retrieve the data just like on the blocking library example or is it even possible with the specific library to do that ? If so can you provide an example of how can this be done?

Thanks in advance

Quick note, in your second code segment, the first /code should just be code.
In the first example, fAvailable and fRead are callback functions. Without seeing all of your code, it's difficult to say. Of all the libraries you can pull off the net, Nick's are generally near the top of the class. They're well tested, albeit sometimes confusing. Post your entire code and let's look at it. I do a lot of RS485 and don't have problems.

I dont have a code written for the exact reason that i have no clue how to implement it, its like trying to solve math problems without knowing what numbers are.

That's why i am here in the programming section, to ask for advice on how to implement things.

So i'll make my question a lot more rugged, what i want to do is use the example code from blocking library with the non-blocking library.

The answer is no because i get errors like

sketch_nonblocking:34: error: 'recvMsg' was not declared in this scope

   byte received = recvMsg (fAvailable, fRead, buf, sizeof (buf));

                                                                ^

sketch_nonblocking:51: error: 'sendMsg' was not declared in this scope

     sendMsg (fWrite, msg, sizeof msg);

                                     ^

exit status 1
'recvMsg' was not declared in this scope

So what do i need to do?