Hi,
I use idkam437x with ccs 6.1.2, sysbios 6.45.1.29, sdk 2.1.1.2 and ndk 2.24.3.35.
I would like to process two kinds of tcp/ip packets: one with high priority for synchronization and as an indicator of transmission start, and the second with my measurements data.
My idea was to receive the first (synchronizing) packet in the hardware interrupt mode by the callback pointer:
((((ICSS_EmacObject*)icssEmacHandle->object)->callBackHandle)->rxRTCallBack)->callBack = (ICSS_EmacCallBack)MyProcessFuntion;
When getting the first packet, the appropriate socket will be created in the respective function or task (unfortunately for me, the task seems to be crucial) until all the data is received. In the end, the socket will be closed and the system will wait for another synchronizing packet.
Does it all seem reasonable and workable for you? The above atypical way was proposed because of a few reasons:
- I do not write network-focused application - in my case the medium will be used interchangeably with UART for occasional measurement data transfer. The main thread is really demanding so I cannot set an infinite task for network scanning (like daemon) as it requires a lot of computing power. That is why I proposed the first packet to synchronize the action of socket creation and data receiving - when I am absolutely sure the data is on line.
- As I know, high priority packets are processed by the callback function and at this stage no socket is required? It should be ready for another, ordinary packet but what if it comes before socket creation? Do I loose it or is it put on stack and can be collected after socket creation?
- The use of DaemonNew() in net hooks looks tempting, however the content of it seems encumbering in my case. Plenty of actions need to be done every loop and it looks to be ideal for network-focused applications.
Please advise me on the above things as I have no experience in ethernet applications.
Thank you!
JJ