NetSim Source Code Help v14.4
All 13 Components
 
Loading...
Searching...
No Matches
Component 11/Satellite/Satellite_Buffer.h
1#pragma once
2/************************************************************************************
3* Copyright (C) 2023 *
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
29extern "C" {
30#endif
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;
54ptrSATELLITE_BUFFER satellite_buffer_init(NETSIM_ID utId, NETSIM_ID utIf,
55 NETSIM_ID gwId, NETSIM_ID gwIf,
56 double sizeInBytes, double maxUnitSizeInBytes);
57void satellite_buffer_setMaxUnitSizeInBytes(ptrSATELLITE_BUFFER buffer, double maxUnitSizeInBytes);
58bool satellite_buffer_add_packet(ptrSATELLITE_BUFFER buffer, NetSim_PACKET* packet);
59NetSim_PACKET* satellite_buffer_remove_packet(ptrSATELLITE_BUFFER buffer);
60NetSim_PACKET* satellite_buffer_head_packet(ptrSATELLITE_BUFFER buffer);
61
62#ifdef __cplusplus
63}
64#endif
65#endif /* _NETSIM_SATELLITE_BUFFER_H_ */