Now we'll try to discuss how we use a rescue function that we have in any like this.
All right.
So let's just go through an entire quote.
So I updated a good a bit as compared to our previous case.
So here we have our data before which have data, which is how long it will get in that we plan to send
to the city.
Right now, our agenda will be to operate.
You are CNN.
Look, look back moves.
What that will do with whatever data we transmit will be receiving back and then storing it in internally.
OK, and then we'll be taking out the data from an outage before and then we'll be sending them back
to the civil terminal in a normal rate.
So if you are operating in a local look back mode and if you try to send the day, you won't be finding
anything display on a console because the same data will be stored into the archive.
So if you want to see a data on two accounts, we need to operate in that normal right here since we
have those suits beatable for our size 11, right?
So we need to declare receive before data again of size 11 by great.
So that is what we do here.
We have an issue like this to anyone.
OK, then we have.
You are.
OK, so this platform and initialization of our you are very bitter.
Now remember in this platform is also doing the same thing for us right now.
Now, since we are manually performing an initialization of a peripheral, so the platform is not required,
right?
So you walk in it itself to perform an initialization of a peripheral right.
So once this system, we proceed and first set up the loop back to local look back.
So here we call you what you yes, take operation.
So this is a function that is used to set the operating mode for our you want.
And then we have a few different rules which are supported by you are straight, so we could operate
in a normal mode.
So here, whatever that we think will be displayed on a console and if you write it down.
And so that is if you go to Vegas.
So here you have an option to send readers to.
Whatever you read in here will be stored in a CFP for electrical.
So this is what we refer to as a normal mode.
OK, the demo that we have is in local loop.
So here whatever data we send to a console will be coming back to receiver and it will be automatically
stored in and receive for it.
So we'll be utilizing or will be switching between this mode in this specific example, right?
So when we go to the main goal right here, we want to operate in the local loop.
So whatever data we write to, a console will be automatically coming back to our rescue people and
that is what we going to reiterate.
Then we call Sandy.
You know, this allow us to transmit the reader to a console, right?
We need to specify an instance structure those sorts of data buffer and then the number of byte we are
transmitting, right?
Then we are waiting for the transmission to complete.
And once that transmission is complete, we can see that since we are operating, are you are using
and local loop back mode, whatever data we have transmitted will be automatically in and out before,
right?
So to take the lead out of an hour before we have a function referred to as it receive for it and it
received.
Now this returns the number of byte that we received or digging out from analytics before it.
So with each new byte we dig out from an R, we need to increment the count, right?
So here we declared when Congress, which is of s32 type and we initialize it to a zero.
So with each new weight we take from it, Alex, before we get this will be returning one and that we
we will be incrementing the value of account right now.
One more thing that we need to make sure is with each new byte, you'll be getting a new element that
you want this to ring that.
Audie.
So with each new element, you need to update the.
The element out of an elevator, you want the studio, right?
And how we had to do that is we knew that with each bite, if you count, will be incremental.
So when we call received function here we have an instance structure and then the point of where we
want was to delete.
All right.
This should also be dynamically updating with each new weight rate.
So here now, instead of having this had this static, OK, what we are doing is we are calling the
received data, which is the agreed that we declared for storing the data that we have in the Nordics
before.
OK, and the element where we want this to data will be updated dynamically as we choose to go right.
So with each new byte we receive now will be incrementally by one.
And this way we will be choosing the new element where we toward the value that we received from you
are right.
This logic that we have written with here will make sure that we take out 11 byte from Bill I before
OK, and we store it into the data.
Before that, we declared for storing the data that we received from that.
You are great.
What this is done now, we want to send the data that we have in a received data before on to concentrate.
So we want to see the value of the data that we have received.
But what so we need to operate?
Are you watching it normally more now?
So how we do that is we are getting calls set operation mode.
OK, here now we are specifying that we want to operate a new normal, right?
So once we set up, though, you want to operate in the normal mode.
We need you just saying don't abide by by going to a concert.
So how we do that is we declared one counter variable which keep the count of the byte that we sent
to a console so far right so far equals to zero, i.e. less than 11 i + + zl print.
If this is a function that we are utilizing, OK, and we are sending a bite by bite to the council.
Now here you could really see the indexes evaluate and with each new iteration, I value will be automatically
incrementing.
So we will be sending the new data on to a console with each new iteration.
Right.
So this is an entire goal.
Now, first, since we do not know whether it will be working as expected, what we are going to do
is the reason why we do not know whether it will be working as expected is because we are utilizing
both the method, right?
So here you are utilizing the lower level API to send the data to a console, whereas here you are utilizing
an higher level API, right?
So they'll print it to send the leaders in.
That is, we need to try our application such that it operates properly, right?
So first, let it just build our application project and try to observe it that we are getting unexpected
results if we do not get an expected result.
We need to work around just to modify this any application project so that we get unexpected results,
right?
So once our bill is finished.
We select our application project, right click Debug at launch on heart rate.
So this will automatically start programming RPG.
So once programming is successful, OK will be going to a vital serial terminal and then connecting
it to the respective to rape scene, Mike is a discomfort.
And we are operating at eight nine six zero zero block, right?
So click OK and then click on resume.
But right now here, the first thing that we are expecting is you walked and it sets us one, right?
But here you could clearly see we are just getting you walked in it and in a straight say, if you count
the number of light that we have received, the four, four, eight, nine, 10 and 11 byte we have
received.
So this is.
I guess we could see here we are receiving a live invite and 11 is something that we specified, all
right.
So our application is not working as expected.
So what we can do here is, as you said, the board right now let us forcefully specify an operation
because this we want to see on a console, right?
So here the mode of operation should be normal.
So let me just go ahead and call this over here.
So this will make sure that we work in a correct mode that is a normal mode.
Now here we are sending the data.
Now we'll make sure that we do not execute the next statement until we send all the reader who we can
make sure that all the details correctly transmitted to a console or not.
We will just call this function right, so we will be waiting till all the data is transmitted and then.
As we complete the transmission, this will return zero and then will be coming out great.
So this will be the first modification that we are doing, so we are forcefully setting up the correct
mode that we want and we are waiting till all the data that we intend to send to a council is sent on
board until right.
So once this is sent now, we proceed and then will again build up our application project.
Great.
So let's see it now.
It works as expected.
Great.
So one Typekit is finished.
We'll just be selecting our debug session and click on.
So let me just clear, Arkansas, all right, and then we will be clicking on resume, but right now
you will see you are in it successful and the that we have been received so far is great.
So this is how you will be streaming your application whenever you are working on different levels.