Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
regression-suites
Commits
4ee578e8
Commit
4ee578e8
authored
Sep 08, 2017
by
Damien George
Browse files
Add Demo_uPy_TypesRI, to test all types sent thru MicroPython to a RI.
parent
b84d634d
Changes
12
Hide whitespace changes
Inline
Side-by-side
Demo_uPy_TypesRI/DataView.asn
0 → 100644
View file @
4ee578e8
TASTE-Dataview DEFINITIONS ::=
BEGIN
IMPORTS T-Int32, T-UInt32, T-Int8, T-UInt8, T-Boolean FROM TASTE-BasicTypes;
-- A few simple types to start with ASN.1
MyInteger ::= T-UInt8
MyReal ::= REAL (0.0 .. 1000.0)
MyBool ::= BOOLEAN
MyEnum ::= ENUMERATED { hello, world, howareyou }
MySeq ::= SEQUENCE {
input-data MyInteger,
output-data MyInteger,
validity ENUMERATED { valid, invalid }
}
MyChoice ::= CHOICE {
a BOOLEAN,
b MySeq
}
MySeqOf ::= SEQUENCE (SIZE (2)) OF MyEnum
MyOctStr ::= OCTET STRING (SIZE (3))
-- You can also declare constants
myVar MySeqOf ::= { hello, world }
END
Demo_uPy_TypesRI/DeploymentView.aadl
0 → 100644
View file @
4ee578e8
---------------------------------------------------
-- AADL2.0
-- TASTE
--
--
---------------------------------------------------
PACKAGE deploymentview::DV::Node1
PUBLIC
WITH Taste;
WITH Deployment;
WITH TASTE_DV_Properties;
PROCESS x86_partition
END x86_partition;
PROCESS IMPLEMENTATION x86_partition.others
END x86_partition.others;
END deploymentview::DV::Node1;
PACKAGE deploymentview::DV
PUBLIC
WITH ocarina_processors_x86;
WITH deploymentview::DV::Node1;
WITH Taste;
WITH Deployment;
WITH interfaceview::IV;
WITH TASTE_DV_Properties;
SYSTEM Node1
END Node1;
SYSTEM IMPLEMENTATION Node1.others
SUBCOMPONENTS
IV_GND : SYSTEM interfaceview::IV::GND.others {
Taste::coordinates => "990 990 1457 1452";
Taste::FunctionName => "GND";
};
IV_PAYLOAD : SYSTEM interfaceview::IV::PAYLOAD.others {
Taste::coordinates => "1636 980 2165 1421";
Taste::FunctionName => "PAYLOAD";
};
x86_partition : PROCESS deploymentview::DV::Node1::x86_partition.others {
Taste::coordinates => "664 752 2276 1614";
Deployment::Port_Number => 0;
};
x86_linux : PROCESSOR ocarina_processors_x86::x86.linux {
Taste::coordinates => "462 506 2477 1737";
};
PROPERTIES
Taste::APLC_Binding => (reference (x86_partition)) APPLIES TO IV_GND;
Taste::APLC_Binding => (reference (x86_partition)) APPLIES TO IV_PAYLOAD;
Actual_Processor_Binding => (reference (x86_linux)) APPLIES TO x86_partition;
END Node1.others;
SYSTEM deploymentview
END deploymentview;
SYSTEM IMPLEMENTATION deploymentview.others
SUBCOMPONENTS
Node1 : SYSTEM Node1.others {
Taste::coordinates => "210 154 2729 1913";
};
interfaceview : SYSTEM interfaceview::IV::interfaceview.others;
END deploymentview.others;
PROPERTIES
Taste::coordinates => "0 0 2970 2100";
Taste::version => "1.3.19";
Taste::interfaceView => "InterfaceView.aadl";
Taste::HWLibraries => ("../../tool-inst/share/ocarina/AADLv2/ocarina_components.aadl");
END deploymentview::DV;
-- copied aadl libraries
\ No newline at end of file
Demo_uPy_TypesRI/InterfaceView.aadl
0 → 100644
View file @
4ee578e8
---------------------------------------------------
-- AADL2.0
-- TASTE
--
--
---------------------------------------------------
PACKAGE interfaceview::FV::GND
PUBLIC
WITH Taste;
WITH DataView;
WITH TASTE_IV_Properties;
SUBPROGRAM PI_CYCLE
PROPERTIES
Taste::Associated_Queue_Size => 1;
END PI_CYCLE;
SUBPROGRAM IMPLEMENTATION PI_CYCLE.others
END PI_CYCLE.others;
SUBPROGRAM RI_TC_Seq_NATIVE
FEATURES
a : IN PARAMETER DataView::MySeq {
Taste::encoding => NATIVE;
};
b : OUT PARAMETER DataView::MySeq {
Taste::encoding => NATIVE;
};
END RI_TC_Seq_NATIVE;
SUBPROGRAM IMPLEMENTATION RI_TC_Seq_NATIVE.others
END RI_TC_Seq_NATIVE.others;
SUBPROGRAM RI_TC_Seq_UPER
FEATURES
a : IN PARAMETER DataView::MySeq {
Taste::encoding => UPER;
};
b : OUT PARAMETER DataView::MySeq {
Taste::encoding => UPER;
};
END RI_TC_Seq_UPER;
SUBPROGRAM IMPLEMENTATION RI_TC_Seq_UPER.others
END RI_TC_Seq_UPER.others;
SUBPROGRAM RI_TC_Choice_NATIVE
FEATURES
a : IN PARAMETER DataView::MyChoice {
Taste::encoding => NATIVE;
};
b : OUT PARAMETER DataView::MyChoice {
Taste::encoding => NATIVE;
};
END RI_TC_Choice_NATIVE;
SUBPROGRAM IMPLEMENTATION RI_TC_Choice_NATIVE.others
END RI_TC_Choice_NATIVE.others;
SUBPROGRAM RI_TC_OctStr_NATIVE
FEATURES
a : IN PARAMETER DataView::MyOctStr {
Taste::encoding => NATIVE;
};
b : OUT PARAMETER DataView::MyOctStr {
Taste::encoding => NATIVE;
};
END RI_TC_OctStr_NATIVE;
SUBPROGRAM IMPLEMENTATION RI_TC_OctStr_NATIVE.others
END RI_TC_OctStr_NATIVE.others;
SUBPROGRAM RI_TC_SeqOf_NATIVE
FEATURES
a : IN PARAMETER DataView::MySeqOf {
Taste::encoding => NATIVE;
};
b : OUT PARAMETER DataView::MySeqOf {
Taste::encoding => NATIVE;
};
END RI_TC_SeqOf_NATIVE;
SUBPROGRAM IMPLEMENTATION RI_TC_SeqOf_NATIVE.others
END RI_TC_SeqOf_NATIVE.others;
END interfaceview::FV::GND;
PACKAGE interfaceview::FV::PAYLOAD
PUBLIC
WITH Taste;
WITH DataView;
WITH TASTE_IV_Properties;
SUBPROGRAM PI_TC_Seq_NATIVE
FEATURES
a : IN PARAMETER DataView::MySeq {
Taste::encoding => NATIVE;
};
b : OUT PARAMETER DataView::MySeq {
Taste::encoding => NATIVE;
};
PROPERTIES
Taste::Associated_Queue_Size => 1;
END PI_TC_Seq_NATIVE;
SUBPROGRAM IMPLEMENTATION PI_TC_Seq_NATIVE.others
END PI_TC_Seq_NATIVE.others;
SUBPROGRAM PI_TC_Seq_UPER
FEATURES
a : IN PARAMETER DataView::MySeq {
Taste::encoding => UPER;
};
b : OUT PARAMETER DataView::MySeq {
Taste::encoding => UPER;
};
PROPERTIES
Taste::Associated_Queue_Size => 1;
END PI_TC_Seq_UPER;
SUBPROGRAM IMPLEMENTATION PI_TC_Seq_UPER.others
END PI_TC_Seq_UPER.others;
SUBPROGRAM PI_TC_Choice_NATIVE
FEATURES
a : IN PARAMETER DataView::MyChoice {
Taste::encoding => NATIVE;
};
b : OUT PARAMETER DataView::MyChoice {
Taste::encoding => NATIVE;
};
PROPERTIES
Taste::Associated_Queue_Size => 1;
END PI_TC_Choice_NATIVE;
SUBPROGRAM IMPLEMENTATION PI_TC_Choice_NATIVE.others
END PI_TC_Choice_NATIVE.others;
SUBPROGRAM PI_TC_OctStr_NATIVE
FEATURES
a : IN PARAMETER DataView::MyOctStr {
Taste::encoding => NATIVE;
};
b : OUT PARAMETER DataView::MyOctStr {
Taste::encoding => NATIVE;
};
PROPERTIES
Taste::Associated_Queue_Size => 1;
END PI_TC_OctStr_NATIVE;
SUBPROGRAM IMPLEMENTATION PI_TC_OctStr_NATIVE.others
END PI_TC_OctStr_NATIVE.others;
SUBPROGRAM PI_TC_SeqOf_NATIVE
FEATURES
a : IN PARAMETER DataView::MySeqOf {
Taste::encoding => NATIVE;
};
b : OUT PARAMETER DataView::MySeqOf {
Taste::encoding => NATIVE;
};
PROPERTIES
Taste::Associated_Queue_Size => 1;
END PI_TC_SeqOf_NATIVE;
SUBPROGRAM IMPLEMENTATION PI_TC_SeqOf_NATIVE.others
END PI_TC_SeqOf_NATIVE.others;
END interfaceview::FV::PAYLOAD;
PACKAGE interfaceview::IV
PUBLIC
WITH interfaceview::FV::GND;
WITH interfaceview::FV::PAYLOAD;
WITH interfaceview::FV;
WITH Taste;
WITH DataView;
WITH TASTE_IV_Properties;
SYSTEM GND
FEATURES
PI_CYCLE : PROVIDES SUBPROGRAM ACCESS interfaceview::FV::GND::PI_CYCLE.others {
Taste::coordinates => "487 180";
Taste::RCMoperationKind => cyclic;
Taste::RCMperiod => 2000 ms;
Taste::Deadline => 2000 ms;
Taste::InterfaceName => "CYCLE";
};
RI_TC_Seq_NATIVE : REQUIRES SUBPROGRAM ACCESS interfaceview::FV::PAYLOAD::PI_TC_Seq_NATIVE.others {
Taste::coordinates => "1246 297";
Taste::RCMoperationKind => any;
Taste::InterfaceName => "TC_Seq_NATIVE";
Taste::labelInheritance => "true";
};
RI_TC_Seq_UPER : REQUIRES SUBPROGRAM ACCESS interfaceview::FV::PAYLOAD::PI_TC_Seq_UPER.others {
Taste::coordinates => "1246 574";
Taste::RCMoperationKind => any;
Taste::InterfaceName => "TC_Seq_UPER";
Taste::labelInheritance => "true";
};
RI_TC_Choice_NATIVE : REQUIRES SUBPROGRAM ACCESS interfaceview::FV::PAYLOAD::PI_TC_Choice_NATIVE.others {
Taste::coordinates => "1246 821";
Taste::RCMoperationKind => any;
Taste::InterfaceName => "TC_Choice_NATIVE";
Taste::labelInheritance => "true";
};
RI_TC_OctStr_NATIVE : REQUIRES SUBPROGRAM ACCESS interfaceview::FV::PAYLOAD::PI_TC_OctStr_NATIVE.others {
Taste::coordinates => "1246 1057";
Taste::RCMoperationKind => any;
Taste::InterfaceName => "TC_OctStr_NATIVE";
Taste::labelInheritance => "true";
};
RI_TC_SeqOf_NATIVE : REQUIRES SUBPROGRAM ACCESS interfaceview::FV::PAYLOAD::PI_TC_SeqOf_NATIVE.others {
Taste::coordinates => "1246 1267";
Taste::RCMoperationKind => any;
Taste::InterfaceName => "TC_SeqOf_NATIVE";
Taste::labelInheritance => "true";
};
PROPERTIES
Source_Language => (Micropython);
END GND;
SYSTEM IMPLEMENTATION GND.others
SUBCOMPONENTS
CYCLE_impl : SUBPROGRAM interfaceview::FV::GND::PI_CYCLE.others {
Compute_Execution_Time => 0 ms .. 0 ms;
};
CONNECTIONS
OpToPICnx_CYCLE_impl : SUBPROGRAM ACCESS CYCLE_impl -> PI_CYCLE;
END GND.others;
SYSTEM PAYLOAD
FEATURES
PI_TC_Seq_NATIVE : PROVIDES SUBPROGRAM ACCESS interfaceview::FV::PAYLOAD::PI_TC_Seq_NATIVE.others {
Taste::coordinates => "1621 298";
Taste::RCMoperationKind => unprotected;
Taste::RCMperiod => 0 ms;
Taste::Deadline => 0 ms;
Taste::InterfaceName => "TC_Seq_NATIVE";
};
PI_TC_Seq_UPER : PROVIDES SUBPROGRAM ACCESS interfaceview::FV::PAYLOAD::PI_TC_Seq_UPER.others {
Taste::coordinates => "1621 575";
Taste::RCMoperationKind => unprotected;
Taste::RCMperiod => 0 ms;
Taste::Deadline => 0 ms;
Taste::InterfaceName => "TC_Seq_UPER";
};
PI_TC_Choice_NATIVE : PROVIDES SUBPROGRAM ACCESS interfaceview::FV::PAYLOAD::PI_TC_Choice_NATIVE.others {
Taste::coordinates => "1621 820";
Taste::RCMoperationKind => unprotected;
Taste::RCMperiod => 0 ms;
Taste::Deadline => 0 ms;
Taste::InterfaceName => "TC_Choice_NATIVE";
};
PI_TC_OctStr_NATIVE : PROVIDES SUBPROGRAM ACCESS interfaceview::FV::PAYLOAD::PI_TC_OctStr_NATIVE.others {
Taste::coordinates => "1621 1057";
Taste::RCMoperationKind => unprotected;
Taste::RCMperiod => 0 ms;
Taste::Deadline => 0 ms;
Taste::InterfaceName => "TC_OctStr_NATIVE";
};
PI_TC_SeqOf_NATIVE : PROVIDES SUBPROGRAM ACCESS interfaceview::FV::PAYLOAD::PI_TC_SeqOf_NATIVE.others {
Taste::coordinates => "1621 1267";
Taste::RCMoperationKind => unprotected;
Taste::RCMperiod => 0 ms;
Taste::Deadline => 0 ms;
Taste::InterfaceName => "TC_SeqOf_NATIVE";
};
PROPERTIES
Source_Language => (C);
END PAYLOAD;
SYSTEM IMPLEMENTATION PAYLOAD.others
SUBCOMPONENTS
TC_Seq_NATIVE_impl : SUBPROGRAM interfaceview::FV::PAYLOAD::PI_TC_Seq_NATIVE.others {
Compute_Execution_Time => 0 ms .. 0 ms;
};
TC_Seq_UPER_impl : SUBPROGRAM interfaceview::FV::PAYLOAD::PI_TC_Seq_UPER.others {
Compute_Execution_Time => 0 ms .. 0 ms;
};
TC_Choice_NATIVE_impl : SUBPROGRAM interfaceview::FV::PAYLOAD::PI_TC_Choice_NATIVE.others {
Compute_Execution_Time => 0 ms .. 0 ms;
};
TC_OctStr_NATIVE_impl : SUBPROGRAM interfaceview::FV::PAYLOAD::PI_TC_OctStr_NATIVE.others {
Compute_Execution_Time => 0 ms .. 0 ms;
};
TC_SeqOf_NATIVE_impl : SUBPROGRAM interfaceview::FV::PAYLOAD::PI_TC_SeqOf_NATIVE.others {
Compute_Execution_Time => 0 ms .. 0 ms;
};
CONNECTIONS
OpToPICnx_TC_Seq_NATIVE_impl : SUBPROGRAM ACCESS TC_Seq_NATIVE_impl -> PI_TC_Seq_NATIVE;
OpToPICnx_TC_Seq_UPER_impl : SUBPROGRAM ACCESS TC_Seq_UPER_impl -> PI_TC_Seq_UPER;
OpToPICnx_TC_Choice_NATIVE_impl : SUBPROGRAM ACCESS TC_Choice_NATIVE_impl -> PI_TC_Choice_NATIVE;
OpToPICnx_TC_OctStr_NATIVE_impl : SUBPROGRAM ACCESS TC_OctStr_NATIVE_impl -> PI_TC_OctStr_NATIVE;
OpToPICnx_TC_SeqOf_NATIVE_impl : SUBPROGRAM ACCESS TC_SeqOf_NATIVE_impl -> PI_TC_SeqOf_NATIVE;
END PAYLOAD.others;
SYSTEM interfaceview
END interfaceview;
SYSTEM IMPLEMENTATION interfaceview.others
SUBCOMPONENTS
GND : SYSTEM interfaceview::IV::GND.others {
Taste::coordinates => "231 185 1241 2057";
};
PAYLOAD : SYSTEM interfaceview::IV::PAYLOAD.others {
Taste::coordinates => "1621 190 2698 2057";
};
CONNECTIONS
PAYLOAD_TC_Seq_NATIVE_GND_TC_Seq_NATIVE : SUBPROGRAM ACCESS PAYLOAD.PI_TC_Seq_NATIVE -> GND.RI_TC_Seq_NATIVE {
Taste::coordinates => "1246 297 1433 297 1433 298 1621 298";
};
PAYLOAD_TC_Seq_UPER_GND_TC_Seq_UPER : SUBPROGRAM ACCESS PAYLOAD.PI_TC_Seq_UPER -> GND.RI_TC_Seq_UPER {
Taste::coordinates => "1246 574 1433 574 1433 575 1621 575";
};
PAYLOAD_TC_Choice_NATIVE_GND_TC_Choice_NATIVE : SUBPROGRAM ACCESS PAYLOAD.PI_TC_Choice_NATIVE -> GND.RI_TC_Choice_NATIVE {
Taste::coordinates => "1246 821 1433 821 1433 820 1621 820";
};
PAYLOAD_TC_OctStr_NATIVE_GND_TC_OctStr_NATIVE : SUBPROGRAM ACCESS PAYLOAD.PI_TC_OctStr_NATIVE -> GND.RI_TC_OctStr_NATIVE {
Taste::coordinates => "1246 1057 1433 1057 1433 1057 1621 1057";
};
PAYLOAD_TC_SeqOf_NATIVE_GND_TC_SeqOf_NATIVE : SUBPROGRAM ACCESS PAYLOAD.PI_TC_SeqOf_NATIVE -> GND.RI_TC_SeqOf_NATIVE {
Taste::coordinates => "1246 1267 1433 1267 1433 1267 1621 1267";
};
END interfaceview.others;
PROPERTIES
Taste::dataView => ("DataView");
Taste::dataViewPath => ("DataView.aadl");
Taste::coordinates => "0 0 2970 2100";
Taste::version => "1.3.19";
END interfaceview::IV;
PACKAGE interfaceview::FV
PUBLIC
WITH Taste;
WITH DataView;
WITH TASTE_IV_Properties;
END interfaceview::FV;
Demo_uPy_TypesRI/InterfaceView.md5
0 → 100644
View file @
4ee578e8
d47e5b875dd1549969c3933d2e025a7c InterfaceView.aadl
Demo_uPy_TypesRI/build-script.sh
0 → 100755
View file @
4ee578e8
#!/bin/bash -e
# This script will build your TASTE system.
# You should not change this file as it was automatically generated.
# If you need additional preprocessing, there are three hook files
# that you can provide and that are called dring the build:
# user_init_pre.sh, user_init_post.sh and user_init_last.sh
# These files will never get overwritten by TASTE.'
# Inside these files you may set some environment variables:
# C_INCLUDE_PATH=/usr/include/xenomai/analogy/:${C_INCLUDE_PATH}
# unset USE_POHIC
CWD
=
$(
pwd
)
if
[
-t
1
]
;
then
COLORON
=
"
\e
[1m
\e
[32m"
COLOROFF
=
"
\e
[0m"
else
COLORON
=
""
COLOROFF
=
""
fi
INFO
=
"
${
COLORON
}
[INFO]
${
COLOROFF
}
"
if
[
-f
user_init_pre.sh
]
then
echo
-e
"
${
INFO
}
Executing user-defined init script"
source
user_init_pre.sh
fi
# Use PolyORB-HI-C runtime
USE_POHIC
=
1
# Detect models from Ellidiss tools v2, and convert them to 1.3
INTERFACEVIEW
=
InterfaceView.aadl
grep
"version =>
\"
2"
InterfaceView.aadl
>
/dev/null
&&
{
echo
-e
"
${
INFO
}
Converting interface view from V2 to V1.3"
TASTE
--load-interface-view
InterfaceView.aadl
--export-interface-view-to-1_3
__iv_1_3.aadl
INTERFACEVIEW
=
__iv_1_3.aadl
}
;
if
[
-z
"
$DEPLOYMENTVIEW
"
]
then
DEPLOYMENTVIEW
=
DeploymentView.aadl
fi
# Detect models from Ellidiss tools v2, and convert them to 1.3
grep
"version =>
\"
2"
"
$DEPLOYMENTVIEW
"
>
/dev/null
&&
{
echo
-e
"
${
INFO
}
Converting deployment view from V2 to V1.3"
TASTE
--load-deployment-view
"
$DEPLOYMENTVIEW
"
--export-deployment-view-to-1_3
__dv_1_3.aadl
DEPLOYMENTVIEW
=
__dv_1_3.aadl
}
;
SKELS
=
"./"
# Check if Dataview references existing files
taste-extract-asn-from-design.exe
-i
"
$INTERFACEVIEW
"
-j
/tmp/dv.asn
cd
"
$SKELS
"
&&
rm
-f
gnd.zip
&&
zip gnd gnd/
*
&&
cd
$OLDPWD
cd
"
$SKELS
"
&&
rm
-f
payload.zip
&&
zip payload payload/
*
&&
cd
$OLDPWD
[
!
-z
"
$CLEANUP
"
]
&&
rm
-rf
binary
*
if
[
-f
ConcurrencyView.pro
]
then
ORCHESTRATOR_OPTIONS+
=
" -w ConcurrencyView.pro "
fi
if
[
-f
user_init_post.sh
]
then
echo
-e
"
${
INFO
}
Executing user-defined post-init script"
source
user_init_post.sh
fi
if
[
!
-z
"
$USE_POHIC
"
]
then
OUTPUTDIR
=
binary.c
ORCHESTRATOR_OPTIONS+
=
" -p "
elif
[
!
-z
"
$USE_POHIADA
"
]
then
OUTPUTDIR
=
binary.ada
else
OUTPUTDIR
=
binary
fi
cd
"
$CWD
"
&&
assert-builder-ocarina.py
\
--fast
\
--debug
\
--aadlv2
\
--keep-case
\
--interfaceView
"
$INTERFACEVIEW
"
\
--deploymentView
"
$DEPLOYMENTVIEW
"
\
-o
"
$OUTPUTDIR
"
\
--subMicroPython
gnd:
"
$SKELS
"
/gnd.zip
\
--subC
payload:
"
$SKELS
"
/payload.zip
\
$ORCHESTRATOR_OPTIONS
if
[
-f
user_init_last.sh
]
then
echo
-e
"
${
INFO
}
Executing user-defined post-build script"
source
user_init_last.sh
fi
Demo_uPy_TypesRI/gnd/asn1crt.h
0 → 100644
View file @
4ee578e8
#ifndef ASN1SCC_ASN1CRT_H_
#define ASN1SCC_ASN1CRT_H_
#if (!defined(_MSC_VER) || _MSC_VER >= 1800)
# ifndef SWIG
# include <stdbool.h>
# endif
#else
typedef
unsigned
char
bool
;
#define true 1
#define false 0
#endif
#ifdef __cplusplus
extern
"C"
{
#endif
#ifndef NULL
#define NULL 0
#endif
#ifndef TRUE
#define TRUE true
#endif
#ifndef FALSE
#define FALSE false
#endif
#ifndef WORD_SIZE
#define WORD_SIZE 8
#endif
typedef
int
asn1SccSint32
;
typedef
unsigned
int
asn1SccUint32
;
typedef
unsigned
char
byte
;
typedef
long
long
asn1SccSint64
;
typedef
unsigned
long
long
asn1SccUint64
;
#if WORD_SIZE==8
typedef
asn1SccUint64
asn1SccUint
;
typedef
asn1SccSint64
asn1SccSint
;
#else
typedef
asn1SccUint32
asn1SccUint
;
typedef
asn1SccSint32
asn1SccSint
;
#endif
#ifdef _MSC_VER
# ifndef INFINITY
# define INFINITY (DBL_MAX+DBL_MAX)
# endif
# ifndef NAN
# define NAN (INFINITY-INFINITY)
# endif
#endif
typedef
bool
flag
;
typedef
char
NullType
;
typedef
struct
{
byte
*
buf
;
long
count
;
long
currentByte
;
/* Next available bit for writting. Possible vallues 0..7, 0 is most significant bit of current byte*/
int
currentBit
;
}
BitStream
;
typedef
struct
{
byte
*
buf
;
long
count
;
long
currentByte
;
flag
EncodeWhiteSpace
;