This repository has been archived by the owner on Jan 26, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathmta_hal.h
1408 lines (1282 loc) · 49.9 KB
/
mta_hal.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
* If not stated otherwise in this file or this component's LICENSE file the
* following copyright and licenses apply:
*
* Copyright 2016 RDK Management
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**********************************************************************
Copyright [2014] [Cisco Systems, Inc.]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
**********************************************************************/
/**
* @file mta_hal.h
* @author cisco
* @brief For CCSP Component: CcspMtaAgent
*
*@description This header file gives the function call prototypes and
structure definitions used for the RDK-Broadband
hardware abstraction layer for Cable Modem
*/
/**********************************************************************
module: mta_hal.h
For CCSP Component: CcspMtaAgent
---------------------------------------------------------------
description:
This header file gives the function call prototypes and
structure definitions used for the RDK-Broadband
hardware abstraction layer for Cable Modem
---------------------------------------------------------------
environment:
This HAL layer is intended to support cable modem drivers
through an open API.
Changes may be needed to support different hardware enviornments.
---------------------------------------------------------------
author:
Cisco
**********************************************************************/
#ifndef __MTA_HAL_H__
#define __MTA_HAL_H__
#include <stdint.h>
#include <netinet/in.h>
/**********************************************************************
CONSTANT DEFINITIONS
**********************************************************************/
/**
* @defgroup mta_hal MTA HAL
*
* This module provides the function call prototypes and structure definitions used for the MTA hardware abstraction layer.
*
* @defgroup MTA_HAL_TYPES MTA HAL Data Types
* @ingroup mta_hal
*
* @defgroup MTA_HAL_APIS MTA HAL APIs
* @ingroup mta_hal
*
**/
/**
* @addtogroup MTA_HAL_TYPES
* @{
*/
#ifndef ULONG
#define ULONG unsigned long
#endif
#ifndef CHAR
#define CHAR char
#endif
#ifndef UCHAR
#define UCHAR unsigned char
#endif
#ifndef BOOLEAN
#define BOOLEAN UCHAR
#endif
#ifndef INT
#define INT int
#endif
#ifndef TRUE
#define TRUE 1
#endif
#ifndef FALSE
#define FALSE 0
#endif
#ifndef ENABLE
#define ENABLE 1
#endif
#ifndef RETURN_OK
#define RETURN_OK 0
#endif
#ifndef RETURN_ERR
#define RETURN_ERR -1
#endif
#ifndef IPV4_ADDRESS_SIZE
#define IPV4_ADDRESS_SIZE 4
#endif
#ifndef MTA_HAL_SHORT_VALUE_LEN
#define MTA_HAL_SHORT_VALUE_LEN 16
#endif
#ifndef MTA_HAL_LONG_VALUE_LEN
#define MTA_HAL_LONG_VALUE_LEN 64
#endif
#ifndef ANSC_IPV4_ADDRESS
/*
* While we're trying really hard to smooth the procedure of switch-over from IPv4 to IPv4, there
* are many places where using the IP address as an integer for comparision and calculation is much
* easier than array-based operation.
*/
#define ANSC_IPV4_ADDRESS \
union \
{ \
unsigned char Dot[IPV4_ADDRESS_SIZE]; \
uint32_t Value; \
}
#endif
/* dect */
/*
* DH This is not the right place to place platform/HAL
* implementation specific definitions here.
* This kind of definitions belongs to hal.c, or another
* header file which is included by hal.c
*
* Fix the other RDK-B vendor's code!!!
*
typedef enum
{
SNMPA_REQ_USER_HANDLER,
SNMPA_REQ_GET_VAL_BY_OID,
SNMPA_REQ_GETNEXT_VAL_BY_OID,
SNMPA_REQ_SET_STRING_BY_OID,
SNMPA_REQ_SET_BYTE_BY_OID,
SNMPA_REQ_SET_OID_BY_OID,
SNMPA_REQ_SET_INT_BY_OID,
SNMPA_REQ_SET_UINT_BY_OID,
SNMPA_REQ_SET_SHORT_BY_OID,
SNMPA_REQ_SET_USHORT_BY_OID,
SNMPA_REQ_SET_IP_BY_OID,
SNMPA_REQ_ENGINE_GET_MY_ID,
SNMPA_REQ_ENGINE_GET_MY_BOOTS,
SNMPA_REQ_ENGINE_GET_MY_TIME,
SNMPA_REQ_TLV11_CONF,
SNMPA_REQ_TLV64_CONF,
SNMPA_REQ_SET_MY_ENGINE_INFO,
} SnmpaIfRequest_e;
*/
/*
* DH This is also questionable why we have to define this kind of
* platform specific capacility in the hal header file
*/
#define DECT_MAX_HANDSETS 5
/**********************************************************************
STRUCTURE DEFINITIONS
**********************************************************************/
typedef struct
_MTAMGMT_MTA_DECT
{
ULONG RegisterDectHandset;
ULONG DeregisterDectHandset;
char HardwareVersion[64];
char RFPI[64];
char SoftwareVersion[64];
char PIN[64];
}
MTAMGMT_MTA_DECT, *PMTAMGMT_MTA_DECT;
typedef struct
_MTAMGMT_MTA_HANDSETS_INFO
{
ULONG InstanceNumber;
BOOLEAN Status;
char LastActiveTime[64];
char HandsetName[64];
char HandsetFirmware[64];
char OperatingTN[64];
char SupportedTN[64];
}
MTAMGMT_MTA_HANDSETS_INFO, *PMTAMGMT_MTA_HANDSETS_INFO;
typedef struct
_MTAMGMT_MTA_DHCP_INFO
{
ANSC_IPV4_ADDRESS IPAddress;
CHAR BootFileName[64];
CHAR FQDN[64];
ANSC_IPV4_ADDRESS SubnetMask;
ANSC_IPV4_ADDRESS Gateway;
ULONG LeaseTimeRemaining;
CHAR RebindTimeRemaining[64];
CHAR RenewTimeRemaining[64];
ANSC_IPV4_ADDRESS PrimaryDNS;
ANSC_IPV4_ADDRESS SecondaryDNS;
CHAR DHCPOption3[64];
CHAR DHCPOption6[64];
CHAR DHCPOption7[64];
CHAR DHCPOption8[64];
CHAR PCVersion[64];
CHAR MACAddress[64];
ANSC_IPV4_ADDRESS PrimaryDHCPServer;
ANSC_IPV4_ADDRESS SecondaryDHCPServer;
}
MTAMGMT_MTA_DHCP_INFO, *PMTAMGMT_MTA_DHCP_INFO;
typedef struct
_MTAMGMT_MTA_DHCPv6_INFO
{
CHAR IPV6Address[INET6_ADDRSTRLEN];
CHAR BootFileName[64];
CHAR FQDN[64];
CHAR Prefix[INET6_ADDRSTRLEN];
CHAR Gateway[INET6_ADDRSTRLEN];
ULONG LeaseTimeRemaining;
CHAR RebindTimeRemaining[64];
CHAR RenewTimeRemaining[64];
CHAR PrimaryDNS[INET6_ADDRSTRLEN];
CHAR SecondaryDNS[INET6_ADDRSTRLEN];
CHAR DHCPOption3[64];
CHAR DHCPOption6[64];
CHAR DHCPOption7[64];
CHAR DHCPOption8[64];
CHAR PCVersion[64];
CHAR MACAddress[64];
CHAR PrimaryDHCPv6Server[INET6_ADDRSTRLEN];
CHAR SecondaryDHCPv6Server[INET6_ADDRSTRLEN];
}
MTAMGMT_MTA_DHCPv6_INFO, *PMTAMGMT_MTA_DHCPv6_INFO;
typedef struct
_MTAMGMT_MTA_SERVICE_FLOW
{
ULONG SFID; /* Id */
CHAR ServiceClassName[256];
CHAR Direction[16]; /* Upstream, Downstream */
ULONG ScheduleType;
BOOLEAN DefaultFlow;
ULONG NomGrantInterval;
ULONG UnsolicitGrantSize;
ULONG TolGrantJitter;
ULONG NomPollInterval;
ULONG MinReservedPkt;
ULONG MaxTrafficRate;
ULONG MinReservedRate;
ULONG MaxTrafficBurst;
CHAR TrafficType[64]; /* SIP, RTP */
ULONG NumberOfPackets; /* packet count */
}
MTAMGMT_MTA_SERVICE_FLOW, *PMTAMGMT_MTA_SERVICE_FLOW;
typedef struct
_MTAMGMT_MTA_CALLS
{
CHAR Codec[64]; /* local side codec used for the call */
CHAR RemoteCodec[64]; /* remote side codec used for the call */
CHAR CallStartTime[64]; /* start time of a call */
CHAR CallEndTime[64]; /* end time of a call */
CHAR CWErrorRate[MTA_HAL_SHORT_VALUE_LEN]; /* ratio of useful signal to background noise */
CHAR PktLossConcealment[MTA_HAL_SHORT_VALUE_LEN]; /* ratio of pkt lost to total expected */
BOOLEAN JitterBufferAdaptive; /* JBA used or not */
BOOLEAN Originator; /* originating side of the call or not */
ANSC_IPV4_ADDRESS RemoteIPAddress; /* remote IP */
ULONG CallDuration; /* length of the call in minutes */
CHAR CWErrors[MTA_HAL_SHORT_VALUE_LEN]; /* code word errors on this channel */
CHAR SNR[MTA_HAL_SHORT_VALUE_LEN]; /* signal to noise ratio * 256 */
CHAR MicroReflections[MTA_HAL_SHORT_VALUE_LEN]; /* return loss measurement */
CHAR DownstreamPower[MTA_HAL_SHORT_VALUE_LEN]; /* downstream power in dbmv */
CHAR UpstreamPower[MTA_HAL_SHORT_VALUE_LEN]; /* upstream power in dbmv */
CHAR EQIAverage[MTA_HAL_SHORT_VALUE_LEN]; /* EQI average */
CHAR EQIMinimum[MTA_HAL_SHORT_VALUE_LEN]; /* EQI minimum */
CHAR EQIMaximum[MTA_HAL_SHORT_VALUE_LEN]; /* EQI maximum */
CHAR EQIInstantaneous[MTA_HAL_SHORT_VALUE_LEN]; /* EQI instantaneous */
CHAR MOS_LQ[MTA_HAL_SHORT_VALUE_LEN]; /* mean opinion score of listening quality, 10-50 */
CHAR MOS_CQ[MTA_HAL_SHORT_VALUE_LEN]; /* mean opinion score of conversational quality, 10-50 */
CHAR EchoReturnLoss[MTA_HAL_SHORT_VALUE_LEN]; /* residual echo return loss, in db */
CHAR SignalLevel[MTA_HAL_SHORT_VALUE_LEN]; /* voice signal relative level, in db */
CHAR NoiseLevel[MTA_HAL_SHORT_VALUE_LEN]; /* noise relative level, in db */
CHAR LossRate[MTA_HAL_SHORT_VALUE_LEN]; /* fraction of RTP data packet loss * 256 */
CHAR DiscardRate[MTA_HAL_SHORT_VALUE_LEN]; /* fraction of RTP data packet discarded * 256 */
CHAR BurstDensity[MTA_HAL_SHORT_VALUE_LEN]; /* fraction of bursting data packet * 256 */
CHAR GapDensity[MTA_HAL_SHORT_VALUE_LEN]; /* fraction of packets within inter-burst gap * 256 */
CHAR BurstDuration[MTA_HAL_SHORT_VALUE_LEN]; /* mean duration of bursts, in milliseconds */
CHAR GapDuration[MTA_HAL_SHORT_VALUE_LEN]; /* mean duration of gaps, in milliseconds */
CHAR RoundTripDelay[MTA_HAL_SHORT_VALUE_LEN]; /* most recent measured RTD, in milliseconds */
CHAR Gmin[MTA_HAL_SHORT_VALUE_LEN]; /* local gap threshold */
CHAR RFactor[MTA_HAL_SHORT_VALUE_LEN]; /* voice quality evaluation for this RTP session */
CHAR ExternalRFactor[MTA_HAL_SHORT_VALUE_LEN]; /* voice quality evaluation for segment on network external to this RTP session */
CHAR JitterBufRate[MTA_HAL_SHORT_VALUE_LEN]; /* adjustment rate of jitter buffer, in milliseconds */
CHAR JBNominalDelay[MTA_HAL_SHORT_VALUE_LEN]; /* nominal jitter buffer length, in milliseconds */
CHAR JBMaxDelay[MTA_HAL_SHORT_VALUE_LEN]; /* maximum jitter buffer length, in milliseconds */
CHAR JBAbsMaxDelay[MTA_HAL_SHORT_VALUE_LEN]; /* absolute maximum delay, in milliseconds */
CHAR TxPackets[MTA_HAL_SHORT_VALUE_LEN]; /* count of transmitted packets */
CHAR TxOctets[MTA_HAL_SHORT_VALUE_LEN]; /* count of transmitted octet packets */
CHAR RxPackets[MTA_HAL_SHORT_VALUE_LEN]; /* count of received packets */
CHAR RxOctets[MTA_HAL_SHORT_VALUE_LEN]; /* count of received octet packets */
CHAR PacketLoss[MTA_HAL_SHORT_VALUE_LEN]; /* count of lost packets */
CHAR IntervalJitter[MTA_HAL_SHORT_VALUE_LEN]; /* stat variance of packet interarrival time, in milliseconds */
CHAR RemoteIntervalJitter[MTA_HAL_SHORT_VALUE_LEN]; /* remote sie IntervalJitter (see local side) */
CHAR RemoteMOS_LQ[MTA_HAL_SHORT_VALUE_LEN]; /* remote side MOS_LQ (see local side) */
CHAR RemoteMOS_CQ[MTA_HAL_SHORT_VALUE_LEN]; /* remote side MOS_CQ (see local side) */
CHAR RemoteEchoReturnLoss[MTA_HAL_SHORT_VALUE_LEN]; /* remote side EchoReturnLoss (see local side) */
CHAR RemoteSignalLevel[MTA_HAL_SHORT_VALUE_LEN]; /* remote side SignalLevel (see local side) */
CHAR RemoteNoiseLevel[MTA_HAL_SHORT_VALUE_LEN]; /* remote side NoiseLevel (see local side) */
CHAR RemoteLossRate[MTA_HAL_SHORT_VALUE_LEN]; /* remote side LossRate (see local side) */
CHAR RemotePktLossConcealment[MTA_HAL_SHORT_VALUE_LEN]; /* remote side PktLossConcealment (see local side) */
CHAR RemoteDiscardRate[MTA_HAL_SHORT_VALUE_LEN]; /* remote side DiscardRate (see local side) */
CHAR RemoteBurstDensity[MTA_HAL_SHORT_VALUE_LEN]; /* remote side BurstDensity (see local side) */
CHAR RemoteGapDensity[MTA_HAL_SHORT_VALUE_LEN]; /* remote side GapDensity (see local side) */
CHAR RemoteBurstDuration[MTA_HAL_SHORT_VALUE_LEN]; /* remote side BurstDuration (see local side) */
CHAR RemoteGapDuration[MTA_HAL_SHORT_VALUE_LEN]; /* remote side GapDuration (see local side) */
CHAR RemoteRoundTripDelay[MTA_HAL_SHORT_VALUE_LEN]; /* remote side RoundTripDelay (see local side) */
CHAR RemoteGmin[MTA_HAL_SHORT_VALUE_LEN]; /* remote side Gmin (see local side) */
CHAR RemoteRFactor[MTA_HAL_SHORT_VALUE_LEN]; /* remote side RFactore (see local side) */
CHAR RemoteExternalRFactor[MTA_HAL_SHORT_VALUE_LEN]; /* remote side ExternalRFactor (see local side) */
BOOLEAN RemoteJitterBufferAdaptive; /* remote side JitterBufferAdaptive (see local side) */
CHAR RemoteJitterBufRate[MTA_HAL_SHORT_VALUE_LEN]; /* remote side JitterBufRate (see local side) */
CHAR RemoteJBNominalDelay[MTA_HAL_SHORT_VALUE_LEN]; /* remote side JBNominalDelay (see local side) */
CHAR RemoteJBMaxDelay[MTA_HAL_SHORT_VALUE_LEN]; /* remote side JBMaxDelay (see local side) */
CHAR RemoteJBAbsMaxDelay[MTA_HAL_SHORT_VALUE_LEN]; /* remote side JBAbsMaxDelay (see local side) */
}
MTAMGMT_MTA_CALLS, *PMTAMGMT_MTA_CALLS;
typedef struct
_MTAMGMT_MTA_LINETABLE_INFO
{
ULONG InstanceNumber;
ULONG LineNumber;
ULONG Status; /* 1 = OnHook; 2 = OffHook */
CHAR HazardousPotential[128]; /* HEMF Test Passed, Not Started */
CHAR ForeignEMF[128]; /* FEMF Test Passed, Not Started */
CHAR ResistiveFaults[128]; /* Not Started */
CHAR ReceiverOffHook[128]; /* Not Started */
CHAR RingerEquivalency[64]; /* Not Started */
CHAR CAName[64];
ULONG CAPort;
ULONG MWD;
ULONG CallsNumber;
PMTAMGMT_MTA_CALLS pCalls;
ULONG CallsUpdateTime;
ULONG OverCurrentFault; /* 1 = Normal,2 = Fault */
}
MTAMGMT_MTA_LINETABLE_INFO, *PMTAMGMT_MTA_LINETABLE_INFO;
typedef struct
_MTAMGMT_MTA_CALLP
{
CHAR LCState[64]; /* In Use, Idle, Out of Service */
CHAR CallPState[64]; /* In Service, OOS */
CHAR LoopCurrent[64]; /* Boosted */
}
MTAMGMT_MTA_CALLP, *PMTAMGMT_MTA_CALLP;
typedef struct
_MTAMGMT_MTA_DSXLOG
{
CHAR Time[64];
CHAR Description[128];
ULONG ID;
ULONG Level;
}
MTAMGMT_MTA_DSXLOG, *PMTAMGMT_MTA_DSXLOG;
typedef struct
_MTAMGMT_MTA_MTALOG_FULL
{
ULONG Index;
ULONG EventID;
CHAR EventLevel[64];
CHAR Time[64];
CHAR* pDescription;
}
MTAMGMT_MTA_MTALOG_FULL, *PMTAMGMT_MTA_MTALOG_FULL;
typedef struct
_MTAMGMT_MTA_BATTERY_INFO
{
CHAR ModelNumber[32];
CHAR SerialNumber[32];
CHAR PartNumber[32];
CHAR ChargerFirmwareRevision[32];
}
MTAMGMT_MTA_BATTERY_INFO, *PMTAMGMT_MTA_BATTERY_INFO;
#define MTA_LINENUMBER 8
typedef enum {
MTA_INIT=0,
MTA_START=1,
MTA_COMPLETE=2,
MTA_ERROR=3,
MTA_REJECTED=4
} MTAMGMT_MTA_STATUS;
typedef enum{
MTA_PROVISIONED=0,
MTA_NON_PROVISIONED=1
} MTAMGMT_MTA_PROVISION_STATUS;
/**
* @}
*/
/**
* @addtogroup MTA_HAL_APIS
* @{
*/
/**********************************************************************************
*
* MTA Subsystem level function prototypes
*
**********************************************************************************/
/* mta_hal_InitDB : */
/**
* @description Retrieves the global information for all shared DBs and makes them accessible locally.
* @param None
*
* @return The status of the operation.
* @retval RETURN_OK if successful.
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous.
* @sideeffect None.
*
* @note This function must not suspend and must not invoke any blocking system
* calls. It should probably just send a message to a driver event handler task.
*
*/
INT mta_hal_InitDB(void);
/* mta_hal_GetDHCPInfo : */
/**
* @description Retrieve all the relevant DHCP info for MTA.
* @param PMTAMGMT_MTA_DHCP_INFO pInfo - all DHCP info for MTA, to be returned
*
* @return The status of the operation.
* @retval RETURN_OK if successful.
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous.
* @sideeffect None.
*
* @note This function must not suspend and must not invoke any blocking system
* calls. It should probably just send a message to a driver event handler task.
*
*/
INT mta_hal_GetDHCPInfo(PMTAMGMT_MTA_DHCP_INFO pInfo);
INT mta_hal_GetDHCPV6Info(PMTAMGMT_MTA_DHCPv6_INFO pInfo);
/* mta_hal_LineTableGetNumberOfEntries : */
/**
* @description Get number of entries in the line table.
* @param None
*
* @return ULONG - number of entries
* @retval RETURN_OK if successful.
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous.
* @sideeffect None.
*
* @note This function must not suspend and must not invoke any blocking system
* calls. It should probably just send a message to a driver event handler task.
*
*/
ULONG mta_hal_LineTableGetNumberOfEntries(void);
/* mta_hal_LineTableGetEntry : */
/**
* @description Get entry of the line table at the given index
* @param INT Index - index to the table entry
* @param PMTAMGMT_MTA_LINETABLE_INFO pEntry - entry info, to be returned
*
* @return The status of the operation
* @retval RETURN_OK if successful.
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous.
* @sideeffect None.
*
* @note This function must not suspend and must not invoke any blocking system
* calls. It should probably just send a message to a driver event handler task.
*
*/
INT mta_hal_LineTableGetEntry(ULONG Index, PMTAMGMT_MTA_LINETABLE_INFO pEntry);
/* mta_hal_TriggerDiagnostics : */
/**
* @description Trigger GR909 Diagnostics
* @param INT Index - line number to perform the GR909 diagnostics on
*
* @return The status of the operation.
* @retval RETURN_OK if successful.
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous.
* @sideeffect None.
*
* @note This function must not suspend and must not invoke any blocking system
* calls. It should probably just send a message to a driver event handler task.
*
*/
INT mta_hal_TriggerDiagnostics(ULONG Index);
/* mta_hal_GetServiceFlow : */
/**
* @description Get all the service flow info
* @param ULONG* Count - number of service flow entries, to be returned
* @param PMTAMGMT_MTA_SERVICE_FLOW *ppCfg - service flow info, to be returned
*
* @return The status of the operation.
* @retval RETURN_OK if successful.
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous.
* @sideeffect None.
*
* @note This function must not suspend and must not invoke any blocking system
* calls. It should probably just send a message to a driver event handler task.
*
*/
INT mta_hal_GetServiceFlow(ULONG* Count, PMTAMGMT_MTA_SERVICE_FLOW *ppCfg);
/* mta_hal_DectGetEnable : */
/**
* @description Get info on if Dect is enabled
* @param BOOLEAN* pBool - boolean value for enabled or not, to be returned
*
* @return The status of the operation.
* @retval RETURN_OK if successful.
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous.
* @sideeffect None.
*
* @note This function must not suspend and must not invoke any blocking system
* calls. It should probably just send a message to a driver event handler task.
*
*/
INT mta_hal_DectGetEnable(BOOLEAN *pBool);
/* mta_hal_DectSetEnable: */
/**
* @description Set Dect to boolean value passed in
* @param BOOLEAN* bBool - boolean value for enabled or not, to be returned
*
* @return The status of the operation.
* @retval RETURN_OK if successful.
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous.
* @sideeffect None.
*
* @note This function must not suspend and must not invoke any blocking system
* calls. It should probably just send a message to a driver event handler task.
*
*/
INT mta_hal_DectSetEnable(BOOLEAN bBool);
/* mta_hal_DectGetRegistrationMode: */
/**
* @description Set Dect to boolean value passed in
* @param BOOLEAN* bBool - boolean value for enabled or not, to be returned
*
* @return The status of the operation.
* @retval RETURN_OK if successful.
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous.
* @sideeffect None.
*
* @note This function must not suspend and must not invoke any blocking system
* calls. It should probably just send a message to a driver event handler task.
*
*/
INT mta_hal_DectGetRegistrationMode(BOOLEAN* pBool);
/* mta_hal_DectSetRegistrationMode: */
/**
* @description Set Dect registration mode
* @param BOOLEAN* bBool - boolean value for enabled or not, to be returned
*
* @return The status of the operation.
* @retval RETURN_OK if successful.
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous.
* @sideeffect None.
*
* @note This function must not suspend and must not invoke any blocking system
* calls. It should probably just send a message to a driver event handler task.
*
*/
INT mta_hal_DectSetRegistrationMode(BOOLEAN bBool);
/* mta_hal_DectDeregisterDectHandset: */
/**
* @description Deregister Dect Handset
* @param ULONG* uValue - unsigned long value for
*
* @return The status of the operation.
* @retval RETURN_OK if successful.
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous.
* @sideeffect None.
*
* @note This function must not suspend and must not invoke any blocking system
* calls. It should probably just send a message to a driver event handler task.
*
*/
INT mta_hal_DectDeregisterDectHandset(ULONG uValue);
/* mta_hal_GetDect: */
/**
* @description Get Dect info
* @param PMTAMGMT_MTA_DECT* pDect - info of Dect
*
* @return The status of the operation.
* @retval RETURN_OK if successful.
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous.
* @sideeffect None.
*
* @note This function must not suspend and must not invoke any blocking system
* calls. It should probably just send a message to a driver event handler task.
*
*/
INT mta_hal_GetDect(PMTAMGMT_MTA_DECT pDect);
/* mta_hal_GetDectPIN: */
/**
* @description get Decr PIN
* @param char* pPINString - PIN value
*
* @return The status of the operation.
* @retval RETURN_OK if successful.
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous.
* @sideeffect None.
*
* @note This function must not suspend and must not invoke any blocking system
* calls. It should probably just send a message to a driver event handler task.
*
*/
INT mta_hal_GetDectPIN(char* pPINString);
/* mta_hal_SetDectPIN: */
/**
* @description Set Dect PIN
* @param char* pPINString - PIN value
*
* @return The status of the operation.
* @retval RETURN_OK if successful.
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous.
* @sideeffect None.
*
* @note This function must not suspend and must not invoke any blocking system
* calls. It should probably just send a message to a driver event handler task.
*
*/
INT mta_hal_SetDectPIN(char* pPINString);
/* mta_hal_GetHandsets: */
/**
* @description Get MTA handset info
* @param ULONG* pulCount - handset number
* @param PMTAMGMT_MTA_HANDSETS_INFO* ppHandsets - Info of MTA handset
*
* @return The status of the operation.
* @retval RETURN_OK if successful.
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous.
* @sideeffect None.
*
* @note This function must not suspend and must not invoke any blocking system
* calls. It should probably just send a message to a driver event handler task.
*
*/
INT mta_hal_GetHandsets(ULONG* pulCount, PMTAMGMT_MTA_HANDSETS_INFO* ppHandsets);
/* mta_hal_GetCalls : */
/**
* @description Retrieve all call info for the given instance number of LineTable
* @param ULONG InstanceNumber - LineTable's instance number
* @param ULONG *Count - number of entries(calls) for the call info array, to be returned
* @param PMTAMGMT_MTA_CALLS *ppCfg - Array of call info, to be returned
*
* @return The status of the operation.
* @retval RETURN_OK if successful.
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous.
* @sideeffect None.
*
* @note This function must not suspend and must not invoke any blocking system
* calls. It should probably just send a message to a driver event handler task.
*
*/
INT mta_hal_GetCalls(ULONG InstanceNumber, ULONG *Count, PMTAMGMT_MTA_CALLS *ppCfg);
/* mta_hal_GetCALLP : */
/**
* @description Retrieve the CALLP status info for the line number
* @param ULONG LineNumber - Line number for which to retrieve info on
* @param PMTAMGMT_MTA_CALLP pCallp - CallP info, to be returned
*
* @return The status of the operation.
* @retval RETURN_OK if successful.
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous.
* @sideeffect None.
*
* @note This function must not suspend and must not invoke any blocking system
* calls. It should probably just send a message to a driver event handler task.
*
*/
INT mta_hal_GetCALLP(ULONG LineNumber, PMTAMGMT_MTA_CALLP pCallp);
/* mta_hal_GetDSXLogs : */
/**
* @description Retrieve all DSX log entries
* @param ULONG *Count - number of entries in the log, to be returned
* @param PMTAMGMT_MTA_DSXLOG *ppDSXLog - array of log entries, to be returned
*
* @return The status of the operation.
* @retval RETURN_OK if successful.
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous.
* @sideeffect None.
*
* @note This function must not suspend and must not invoke any blocking system
* calls. It should probably just send a message to a driver event handler task.
*
*/
INT mta_hal_GetDSXLogs(ULONG *Count, PMTAMGMT_MTA_DSXLOG *ppDSXLog);
/* mta_hal_GetDSXLogEnable : */
/**
* @description Get the value of if DSX log is enabled
* @param BOOLEAN * pBool - boolean value of enable, to be returned
*
* @return The status of the operation.
* @retval RETURN_OK if successful.
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous.
* @sideeffect None.
*
* @note This function must not suspend and must not invoke any blocking system
* calls. It should probably just send a message to a driver event handler task.
*
*/
INT mta_hal_GetDSXLogEnable(BOOLEAN *pBool);
/* mta_hal_SetDSXLogEnable : */
/**
* @description Set value of DSX enable to the value
* @param BOOLEAN Bool - value to set DSX log enable to
*
* @return The status of the operation.
* @retval RETURN_OK if successful.
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous.
* @sideeffect None.
*
* @note This function must not suspend and must not invoke any blocking system
* calls. It should probably just send a message to a driver event handler task.
*
*/
INT mta_hal_SetDSXLogEnable(BOOLEAN Bool);
/* mta_hal_ClearCallSignallingLog : */
/**
* @description Set value of ClearDSXLog to the value
* @param BOOLEAN Bool - value to set to clear DSX log.
*
* @return The status of the operation.
* @retval RETURN_OK if successful.
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous.
* @sideeffect None.
*
* @note This function must not suspend and must not invoke any blocking system
* calls. It should probably just send a message to a driver event handler task.
*
*/
INT mta_hal_ClearDSXLog(BOOLEAN Bool) ;
/* mta_hal_GetCallSignallingLogEnable : */
/**
* @description Get the value of if CallSignalling log is enabled
* @param BOOLEAN * pBool - boolean value of enable, to be returned
*
* @return The status of the operation.
* @retval RETURN_OK if successful.
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous.
* @sideeffect None.
*
* @note This function must not suspend and must not invoke any blocking system
* calls. It should probably just send a message to a driver event handler task.
*
*/
INT mta_hal_GetCallSignallingLogEnable(BOOLEAN *pBool) ;
/* mta_hal_SetCallSignallingLogEnable : */
/**
* @description Set value of CallSignalling enable to the value
* @param BOOLEAN Bool - value to set CallSignalling log enable to
*
* @return The status of the operation.
* @retval RETURN_OK if successful.
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous.
* @sideeffect None.
*
* @note This function must not suspend and must not invoke any blocking system
* calls. It should probably just send a message to a driver event handler task.
*
*/
INT mta_hal_SetCallSignallingLogEnable(BOOLEAN Bool) ;
/* mta_hal_ClearCallSignallingLog : */
/**
* @description Set value of CallSignalling enable to the value
* @param BOOLEAN Bool - value to set to clear CallSignalling log.
*
* @return The status of the operation.
* @retval RETURN_OK if successful.
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous.
* @sideeffect None.
*
* @note This function must not suspend and must not invoke any blocking system
* calls. It should probably just send a message to a driver event handler task.
*
*/
INT mta_hal_ClearCallSignallingLog(BOOLEAN Bool) ;
/* mta_hal_GetMtaLog : */
/**
* @description Get all log entries from the MTA Log
* @param ULONG *Count - number of entries in the log, to be returned
* @param PMTAMGMT_MTA_MTALOG_FULL *ppCfg - array of log entries, to be returned
*
* @return The status of the operation.
* @retval RETURN_OK if successful.
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous.
* @sideeffect None.
*
* @note This function must not suspend and must not invoke any blocking system
* calls. It should probably just send a message to a driver event handler task.
*
*/
INT mta_hal_GetMtaLog(ULONG *Count, PMTAMGMT_MTA_MTALOG_FULL *ppCfg);
/* mta_hal_BatteryGetInstalled : */
/**
* @description Check to see if the battery is installed
* @param BOOLEAN* Val - TRUE/FALSE, value to be returned
*
* @return The status of the operation.
* @retval RETURN_OK if successful.
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous.
* @sideeffect None.
*
* @note This function must not suspend and must not invoke any blocking system
* calls. It should probably just send a message to a driver event handler task.
*
*/
INT mta_hal_BatteryGetInstalled(BOOLEAN* Val);
/* mta_hal_BatteryGetTotalCapacity : */
/**
* @description Get the total capacity of the battery
* @param INT* Val - capacity in mAVHour, to be returned
*
* @return The status of the operation.
* @retval RETURN_OK if successful.
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous.
* @sideeffect None.
*
* @note This function must not suspend and must not invoke any blocking system
* calls. It should probably just send a message to a driver event handler task.
*
*/
INT mta_hal_BatteryGetTotalCapacity(ULONG* Val);
/* mta_hal_BatteryGetActualCapacity : */
/**
* @description Retrieve the actual capacity of the battery
* @param INT* Val - capacity in mAVHour, to be returned
*
* @return The status of the operation.
* @retval RETURN_OK if successful.
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous.
* @sideeffect None.
*
* @note This function must not suspend and must not invoke any blocking system
* calls. It should probably just send a message to a driver event handler task.
*
*/
INT mta_hal_BatteryGetActualCapacity(ULONG* Val);
/* mta_hal_BatteryGetRemainingCharge : */
/**
* @description Retrieve the current charge remain in the battery
* @param INT* Val - capacity in mAVHour, to be returned
*
* @return The status of the operation.
* @retval RETURN_OK if successful.
* @retval RETURN_ERR if any error is detected
*
* @execution Synchronous.
* @sideeffect None.
*
* @note This function must not suspend and must not invoke any blocking system
* calls. It should probably just send a message to a driver event handler task.