NetSim Source Code Help
Loading...
Searching...
No Matches
Satellite_Buffer.h
Go to the documentation of this file.
1
#pragma once
2
/************************************************************************************
3
* Copyright (C) 2021 *
4
* TETCOS, Bangalore. India *
5
* *
6
* Tetcos owns the intellectual property rights in the Product and its content. *
7
* The copying, redistribution, reselling or publication of any or all of the *
8
* Product or its content without express prior written consent of Tetcos is *
9
* prohibited. Ownership and / or any other right relating to the software and all *
10
* intellectual property rights therein shall remain at all times with Tetcos. *
11
* *
12
* This source code is licensed per the NetSim license agreement. *
13
* *
14
* No portion of this source code may be used as the basis for a derivative work, *
15
* or used, for any purpose other than its intended use per the NetSim license *
16
* agreement. *
17
* *
18
* This source code and the algorithms contained within it are confidential trade *
19
* secrets of TETCOS and may not be used as the basis for any other software, *
20
* hardware, product or service. *
21
* *
22
* Author: Shashi Kant Suman *
23
* *
24
* ----------------------------------------------------------------------------------*/
25
#ifndef _NETSIM_SATELLITE_BUFFER_H_
26
#define _NETSIM_SATELLITE_BUFFER_H_
27
28
#ifdef __cplusplus
29
extern
"C"
{
30
#endif
31
typedef
struct
stru_satellite_buffer
32
{
33
NETSIM_ID
utId
;
34
NETSIM_ID
utIf
;
35
36
NETSIM_ID
gwId
;
37
NETSIM_ID
gwIf
;
38
39
double
maxSizeInBytes
;
40
double
maxUnitSizeInBytes
;
41
42
double
sizeInBytes
;
43
UINT
count
;
44
45
NetSim_PACKET
*
head
;
46
NetSim_PACKET
*
tail
;
47
48
double
rank
;
49
50
UINT
slotReqd
;
51
52
UINT
allocatedSlotCount
;
53
}
SATELLITE_BUFFER
, *
ptrSATELLITE_BUFFER
;
54
ptrSATELLITE_BUFFER
satellite_buffer_init
(
NETSIM_ID
utId,
NETSIM_ID
utIf,
55
NETSIM_ID
gwId,
NETSIM_ID
gwIf,
56
double
sizeInBytes,
double
maxUnitSizeInBytes);
57
void
satellite_buffer_setMaxUnitSizeInBytes
(
ptrSATELLITE_BUFFER
buffer,
double
maxUnitSizeInBytes);
58
bool
satellite_buffer_add_packet
(
ptrSATELLITE_BUFFER
buffer,
NetSim_PACKET
* packet);
59
NetSim_PACKET
*
satellite_buffer_remove_packet
(
ptrSATELLITE_BUFFER
buffer);
60
NetSim_PACKET
*
satellite_buffer_head_packet
(
ptrSATELLITE_BUFFER
buffer);
61
62
#ifdef __cplusplus
63
}
64
#endif
65
#endif
/* _NETSIM_SATELLITE_BUFFER_H_ */
NETSIM_ID
unsigned int NETSIM_ID
Definition:
Animation.h:45
UINT
#define UINT
Definition:
Linux.h:38
satellite_buffer_init
ptrSATELLITE_BUFFER satellite_buffer_init(NETSIM_ID utId, NETSIM_ID utIf, NETSIM_ID gwId, NETSIM_ID gwIf, double sizeInBytes, double maxUnitSizeInBytes)
Definition:
Satellite_buffer.c:28
satellite_buffer_remove_packet
NetSim_PACKET * satellite_buffer_remove_packet(ptrSATELLITE_BUFFER buffer)
Definition:
Satellite_buffer.c:77
ptrSATELLITE_BUFFER
struct stru_satellite_buffer * ptrSATELLITE_BUFFER
satellite_buffer_setMaxUnitSizeInBytes
void satellite_buffer_setMaxUnitSizeInBytes(ptrSATELLITE_BUFFER buffer, double maxUnitSizeInBytes)
Definition:
Satellite_buffer.c:42
satellite_buffer_head_packet
NetSim_PACKET * satellite_buffer_head_packet(ptrSATELLITE_BUFFER buffer)
Definition:
Satellite_buffer.c:93
SATELLITE_BUFFER
struct stru_satellite_buffer SATELLITE_BUFFER
satellite_buffer_add_packet
bool satellite_buffer_add_packet(ptrSATELLITE_BUFFER buffer, NetSim_PACKET *packet)
Definition:
Satellite_buffer.c:47
stru_NetSim_Packet
Definition:
Packet.h:255
stru_satellite_buffer
Definition:
Satellite_Buffer.h:32
stru_satellite_buffer::gwId
NETSIM_ID gwId
Definition:
Satellite_Buffer.h:36
stru_satellite_buffer::tail
NetSim_PACKET * tail
Definition:
Satellite_Buffer.h:46
stru_satellite_buffer::count
UINT count
Definition:
Satellite_Buffer.h:43
stru_satellite_buffer::slotReqd
UINT slotReqd
Definition:
Satellite_Buffer.h:50
stru_satellite_buffer::sizeInBytes
double sizeInBytes
Definition:
Satellite_Buffer.h:42
stru_satellite_buffer::allocatedSlotCount
UINT allocatedSlotCount
Definition:
Satellite_Buffer.h:52
stru_satellite_buffer::gwIf
NETSIM_ID gwIf
Definition:
Satellite_Buffer.h:37
stru_satellite_buffer::rank
double rank
Definition:
Satellite_Buffer.h:48
stru_satellite_buffer::maxUnitSizeInBytes
double maxUnitSizeInBytes
Definition:
Satellite_Buffer.h:40
stru_satellite_buffer::maxSizeInBytes
double maxSizeInBytes
Definition:
Satellite_Buffer.h:39
stru_satellite_buffer::utId
NETSIM_ID utId
Definition:
Satellite_Buffer.h:33
stru_satellite_buffer::utIf
NETSIM_ID utIf
Definition:
Satellite_Buffer.h:34
stru_satellite_buffer::head
NetSim_PACKET * head
Definition:
Satellite_Buffer.h:45
ALL
Component 11
Satellite
Satellite_Buffer.h
Generated on Fri Dec 9 2022 10:22:46 for NetSim Source Code Help by
1.9.5