-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Converting ByteStreamDriverModel into an interface
- Loading branch information
Showing
20 changed files
with
116 additions
and
152 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
module Drv { | ||
|
||
@ Status returned by the send call | ||
enum SendStatus { | ||
SEND_OK = 0 @< Send worked as expected | ||
SEND_RETRY = 1 @< Data send should be retried | ||
SEND_ERROR = 2 @< Send error occurred retrying may succeed | ||
} | ||
|
||
@ Send data out through the byte stream | ||
port ByteStreamSend( | ||
ref sendBuffer: Fw.Buffer @< Data to send | ||
) -> SendStatus | ||
|
||
@ Status associated with the received data | ||
enum RecvStatus { | ||
RECV_OK = 0 @< Receive worked as expected | ||
RECV_ERROR = 1 @< Receive error occurred retrying may succeed | ||
} | ||
|
||
@ Carries the received bytes stream driver | ||
port ByteStreamRecv( | ||
ref recvBuffer: Fw.Buffer | ||
recvStatus: RecvStatus | ||
) | ||
|
||
enum PollStatus { | ||
POLL_OK = 0 @< Poll successfully received data | ||
POLL_RETRY = 1 @< No data available, retry later | ||
POLL_ERROR = 2 @< Error received when polling | ||
} | ||
|
||
port ByteStreamPoll( | ||
ref pollBuffer: Fw.Buffer | ||
) -> PollStatus | ||
|
||
@ Signal indicating the driver is ready to send and received data | ||
port ByteStreamReady() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
@ Port invoked when the driver is ready to send/receive data | ||
output port ready: Drv.ByteStreamReady | ||
|
||
@ Port invoked when driver has received data | ||
output port $recv: Drv.ByteStreamRecv | ||
|
||
@ Port invoked to send data out the driver | ||
guarded input port send: Drv.ByteStreamSend |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
module Drv { | ||
passive component TcpClient { | ||
|
||
include "../Interfaces/ByteStreamDriverInterface.fppi" | ||
|
||
output port allocate: Fw.BufferGet | ||
|
||
output port deallocate: Fw.BufferSend | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
module Drv { | ||
passive component TcpServer { | ||
|
||
include "../Interfaces/ByteStreamDriverInterface.fppi" | ||
|
||
output port allocate: Fw.BufferGet | ||
|
||
output port deallocate: Fw.BufferSend | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
module Drv { | ||
passive component Udp { | ||
|
||
include "../Interfaces/ByteStreamDriverInterface.fppi" | ||
|
||
output port allocate: Fw.BufferGet | ||
|
||
output port deallocate: Fw.BufferSend | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// ====================================================================== | ||
// Udp.hpp | ||
// Standardization header for Udp | ||
// ====================================================================== | ||
|
||
#ifndef Drv_Udp_HPP | ||
#define Drv_Udp_HPP | ||
|
||
#include "Drv/Udp/UdpComponentImpl.hpp" | ||
|
||
namespace Drv { | ||
|
||
typedef UdpComponentImpl Udp; | ||
|
||
} | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.