Documentation ¶
Overview ¶
Simple SISO Channel interface that creates links and emulates multipath channel between transmitters and receivers Will soon be moved to github.com/wiless/gocomm package
Index ¶
- Variables
- type BufferState
- type Channel
- func (c *Channel) AddReceiver(rx cell.Receiver)
- func (c *Channel) AddTransmiter(tx cell.Transmitter)
- func (c *Channel) CheckReceivers() bool
- func (c *Channel) CheckTransmitters() bool
- func (c *Channel) CreateFromFile(file string)
- func (c *Channel) GetRxNodeIDs(sfid int) vlib.VectorI
- func (c *Channel) GetTxNodeIDs(sfid int) vlib.VectorI
- func (c *Channel) Init()
- func (c *Channel) SFN() int
- func (c *Channel) SFNids() vlib.VectorI
- func (c *Channel) Start(sfids ...int)
- type ReceiverBufferManager
- type RecieverBuffer
- type SFN
- type Status
- type TransmitterBuffer
- func (t *TransmitterBuffer) ReadObj() gocomm.SComplex128AObj
- func (t *TransmitterBuffer) ReadSamples() vlib.VectorC
- func (t *TransmitterBuffer) SetState(bf BufferState)
- func (t *TransmitterBuffer) Update()
- func (t *TransmitterBuffer) WriteObj(obj gocomm.SComplex128AObj)
- func (t *TransmitterBuffer) WriteSamples(v vlib.VectorC)
- type TransmitterBufferManager
Constants ¶
This section is empty.
Variables ¶
View Source
var BufferStates = [...]string{
"DataReady",
"DataSent",
"DataACKed",
}
Functions ¶
This section is empty.
Types ¶
type BufferState ¶
type BufferState int
const ( DataReady BufferState = iota DataSent DataACKed )
func (BufferState) String ¶
func (b BufferState) String() string
type Channel ¶
type Channel struct {
// contains filtered or unexported fields
}
func NewWirelessChannel ¶
func NewWirelessChannel(links []cell.LinkMetric) *Channel
func (*Channel) AddReceiver ¶
AddReceiver adds the receiver rx and assoicates with the rxnodeid from rx.GetID()
func (*Channel) AddTransmiter ¶
func (c *Channel) AddTransmiter(tx cell.Transmitter)
AddTransmitter adds the transmitter tx and assoicates with the txnodeid from tx.GetID()
func (*Channel) CheckReceivers ¶
CheckTransmitters checks if a Transmitter is set for all the txnodeids set through linkmetrics
func (*Channel) CheckTransmitters ¶
CheckTransmitters checks if a Transmitter is set for all the txnodeids set through linkmetrics
func (*Channel) CreateFromFile ¶
type ReceiverBufferManager ¶
type ReceiverBufferManager struct { sync.Mutex TxReadyStatus map[int]*Status // contains filtered or unexported fields }
func (*ReceiverBufferManager) Create ¶
func (r *ReceiverBufferManager) Create(rxid int, totalTxIDs int)
func (*ReceiverBufferManager) GetCh ¶
func (r *ReceiverBufferManager) GetCh(rid int) gocomm.Complex128AChannel
func (*ReceiverBufferManager) ShouldACK ¶
func (r *ReceiverBufferManager) ShouldACK(txid int) bool
func (*ReceiverBufferManager) UpdateCounter ¶
func (r *ReceiverBufferManager) UpdateCounter(txid int)
type RecieverBuffer ¶
func (*RecieverBuffer) Accumulate ¶
func (r *RecieverBuffer) Accumulate(samples vlib.VectorC)
func (*RecieverBuffer) Write ¶
func (r *RecieverBuffer) Write(obj gocomm.SComplex128AObj)
type SFN ¶
type SFN struct { Port2LinkIndex map[int]int // Lookup of the row index for the given receiver-id // contains filtered or unexported fields }
func (*SFN) GetRxNodeIDs ¶
func (*SFN) GetTxNodeIDs ¶
func (*SFN) StartBufferManager ¶
func (s *SFN) StartBufferManager()
type TransmitterBuffer ¶
func (*TransmitterBuffer) ReadObj ¶
func (t *TransmitterBuffer) ReadObj() gocomm.SComplex128AObj
func (*TransmitterBuffer) ReadSamples ¶
func (t *TransmitterBuffer) ReadSamples() vlib.VectorC
func (*TransmitterBuffer) SetState ¶
func (t *TransmitterBuffer) SetState(bf BufferState)
func (*TransmitterBuffer) Update ¶
func (t *TransmitterBuffer) Update()
func (*TransmitterBuffer) WriteObj ¶
func (t *TransmitterBuffer) WriteObj(obj gocomm.SComplex128AObj)
func (*TransmitterBuffer) WriteSamples ¶
func (t *TransmitterBuffer) WriteSamples(v vlib.VectorC)
type TransmitterBufferManager ¶
type TransmitterBufferManager struct {
// contains filtered or unexported fields
}
func (*TransmitterBufferManager) Get ¶
func (t *TransmitterBufferManager) Get(tid int) gocomm.Complex128AChannel
func (*TransmitterBufferManager) ReadyForNextSlot ¶
func (t *TransmitterBufferManager) ReadyForNextSlot() bool
func (*TransmitterBufferManager) Set ¶
func (t *TransmitterBufferManager) Set(tid int, ch gocomm.Complex128AChannel)
func (*TransmitterBufferManager) Start ¶
func (t *TransmitterBufferManager) Start()
Click to show internal directories.
Click to hide internal directories.