NetBurner 3.5.8
PDF Version
Toggle main menu visibility
nbWifiSerial.h
1
/*NB_REVISION*/
2
3
/*NB_COPYRIGHT*/
4
8
9
#ifndef __NBWIFISERIAL_H
10
#define __NBWIFISERIAL_H
11
12
#include <buffers.h>
13
#include <nettypes.h>
14
#include <netinterface.h>
15
#include <constants.h>
16
#include <utils.h>
17
#include <wifi/wifiDriver.h>
18
#include <wifi/nbwifi/nbWifiDriver.h>
19
20
namespace
NB
21
{
22
class
NBWifiSerial :
public
NBWifi
23
{
24
int
fd_serial;
25
int
portNum;
26
uint32_t baudRate;
27
uint32_t rxCount, txCount;
28
int
SyncSerialStream(
int
syncRemaining);
29
30
void
RXTask()
override
;
31
32
// all return the amount of additional space used in the rxBuffer
33
int
ReadMessage(PoolPtr pp, uint16_t messageLength,
bool
overwrite =
false
);
34
35
virtual
void
SendBusMessage_Core(PoolPtr txMessage)
override
;
36
virtual
void
TransmitBuffer_Core(PoolPtr txBuffer, uint8_t credits)
override
;
37
38
friend
class
Master;
39
friend
class
NBWifi;
40
41
public
:
42
/* InterfaceBlock virtual functions */
43
void
send_func(PoolPtr poolPtr)
override
;
44
void
kill_if()
override
;
45
void
EnableMulticast
(MACADR macAddress, BOOL addAddress)
override
;
46
bool
LinkActive
()
override
;
47
int
LinkSpeed
()
override
;
48
bool
LinkDuplex
()
override
;
49
const
char
*
GetInterfaceName
()
override
;
50
51
void
SendCreditRequest()
override
;
52
void
SendCreditReport(uint8_t credits = 0xFF)
override
;
53
virtual
bool
SetBusSpeed(uint32_t busSpeed)
override
;
54
NBWifiSerial(
int
portNum,
int
resetPinNum,
const
char
*name);
55
};
56
}
// namespace NB
57
58
#endif
/* ----- #ifndef __NBWIFISERIAL_H ----- */
InterfaceBlock::GetInterfaceName
virtual const char * GetInterfaceName()
Returns the interface name network interface.
InterfaceBlock::LinkDuplex
virtual bool LinkDuplex()=0
Returns the full or half link duplex of the network interface.
InterfaceBlock::LinkActive
virtual bool LinkActive()=0
Returns the link status of the network interface.
InterfaceBlock::LinkSpeed
virtual int LinkSpeed()=0
Returns the link speed of the network interface.
EnableMulticast
void EnableMulticast(MACADR macAddress, int interface=0)
Enable Multicast on an existing interface.
libraries
include
wifi
nbwifi
nbWifiSerial.h
Generated by
1.18.0