URL
https://opencores.org/ocsvn/wbuart32/wbuart32/trunk
[/] [wbuart32/] [trunk/] [bench/] [cpp/] [uartsim.h] - Diff between revs 18 and 23
Go to most recent revision |
Show entire file |
Details |
Blame |
View Log
Rev 18 |
Rev 23 |
Line 83... |
Line 83... |
// network socket connection to our device
|
// network socket connection to our device
|
void check_for_new_connections(void);
|
void check_for_new_connections(void);
|
|
|
// nettick() gets called if we are connected to a network, and
|
// nettick() gets called if we are connected to a network, and
|
int nettick(const int i_tx);
|
int nettick(const int i_tx);
|
// fdtick() if we are not.
|
|
int fdtick(const int i_tx);
|
int fdtick(const int i_tx);
|
|
int rawtick(const int i_tx, const bool network);
|
|
|
// We'll use the file descriptor for the listener socket to determine
|
// We'll use the file descriptor for the listener socket to determine
|
// whether we are connected to the network or not. If not connected
|
// whether we are connected to the network or not. If not connected
|
// to the network, then we assume m_conrd and m_conwr refer to
|
// to the network, then we assume m_conrd and m_conwr refer to
|
// your more traditional file descriptors, and use them as such.
|
// your more traditional file descriptors, and use them as such.
|
int tick(const int i_tx) {
|
int tick(const int i_tx) {
|
if (m_skt >= 0)
|
return rawtick(i_tx, (m_skt >= 0));
|
return nettick(i_tx);
|
|
else
|
|
return fdtick(i_tx);
|
|
}
|
}
|
|
|
public:
|
public:
|
//
|
//
|
// The UARTSIM constructor takes one argument: the port on the
|
// The UARTSIM constructor takes one argument: the port on the
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.