Commit acba10e1 authored by LEGEARD Luc's avatar LEGEARD Luc
Browse files

Add tutorial (if tuto directory) Add GetEventNumberFromCommonFrameData() and...

Add tutorial (if tuto directory)  Add GetEventNumberFromCommonFrameData() and GetTimeStampFromCommonFrameData() methode
parent 050faf13
......@@ -87,8 +87,9 @@ DataGenParameters.h MFMAllFrames.h MFMCoboTopoFrame.h MFMMergeFrame.h
DataParameters.h MFMBasicFrame.h MFMCommonFrame.h MFMMutantFrame.h MFMRibfFrame.h MFMScalerDataFrame.h MFMXmlFileHeaderFrame.h
DataPar.h MFMBlobFrame.h MFMDiamantFrame.h MFMNedaCompFrame.h MFMS3AlphaFrame.h MFMTypes.h XmlTags.h
DataScalers.h MFMBoxDiagFrame.h MFMEbyedatFrame.h MFMNedaFrame.h MFMS3BaF2Frame.h MFMVamosICFrame.h MFMReaTraceFrame.h
DataScal.h MFMChimeraFrame.h MFMExogamFrame.h MFMS3eGUNFrame.h MFMVamosPDFrame.h MFMReaGenericFrame.h MFMSiriusFrame.h MFMS3DeflectorFrame.h CUtilities.h
DataScal.h MFMChimeraFrame.h MFMExogamFrame.h MFMS3eGUNFrame.h MFMVamosPDFrame.h MFMReaGenericFrame.h MFMSiriusFrame.h MFMS3DeflectorFrame.h CUtilities.h
ArgInterpretor.h GanTape/GEN_TYPE.H GanTape/gan_acq_buf.h GanTape/acq_ebyedat_get_next_event.h GanTape/STR_EVT.H GanTape/gan_tape_erreur.h GanTape/gan_acq_swap_buf.h
MFMFewDefines.h
)
......
#include <stdlib.h>
#ifndef __CUtilities__
#define __CUtilities__
#include <string>
#include <stdio.h>
#include <stdlib.h>
//
// Few util classes for vectors management
//
......@@ -15,7 +19,7 @@ class UtilVector_c
char * fPtTempo;
int fSize;
int fUsedSize;
bool IsSpaceInstanciedInThisClass;
public:
//___________________________________________________________________________________
......@@ -24,6 +28,7 @@ class UtilVector_c
fPtTempo = NULL;
fSize = 0;
fUsedSize = 0;
IsSpaceInstanciedInThisClass= false;
}
//_______________________________________________________________________________
UtilVector_c(int size){
......@@ -32,20 +37,55 @@ class UtilVector_c
fPtTempo = NULL;
fPt = NULL;
ReSize(size);
IsSpaceInstanciedInThisClass= true;
Reset();
}
//_______________________________________________________________________________
UtilVector_c(char* buff, int size){
SetExternalPointers(buff, size);
}
//_______________________________________________________________________________
UtilVector_c(char** buff, int* size){
SetExternalPointers( buff, size);
}
//_______________________________________________________________________________
~UtilVector_c() {
if (fPt){
delete[]fPt;
~UtilVector_c() {
if (IsSpaceInstanciedInThisClass){
if (fPt ){
//printf( " DEBUG : Delete UtilVector_c;:~UtilVector_c : %lld \n",(long long*) fPt);
free(fPt);
fPt = NULL;
}
fSize = 0;
}
}
}
//_______________________________________________________________________________
void ReSize(int size) {
//_______________________________________________________________________________
void SetExternalPointers(char** buff, int *size){
fUsedSize = *size;
fSize = *size;
fPtTempo = NULL;
if(fPt and IsSpaceInstanciedInThisClass) free(fPt);
fPt = *buff;
IsSpaceInstanciedInThisClass= false;
}
//_______________________________________________________________________________
void SetExternalPointers(char* buff, int size){
fUsedSize = size;
fSize = size;
fPtTempo = NULL;
if(fPt and IsSpaceInstanciedInThisClass) free(fPt);
fPt = buff;
IsSpaceInstanciedInThisClass= false;
}
//_______________________________________________________________________________
void ReSize(int size) {
int i=0;
int old= fSize;
if (fPt == NULL){
fPtTempo = (char*) (malloc(size));
for (int i = 0; i < size; i++) ((char*) fPtTempo)[i] = 0;
......@@ -55,28 +95,34 @@ class UtilVector_c
if (size > fSize)
for ( i = fSize; i < size; i++) fPtTempo[i] = 0;
}
//printf( " DEBUG : UtilVector_c:ReSize(%d), oldsize = %d, pt = %lld old pt = %lld \n",size,old,(long long *)fPtTempo,(long long *)fPt);
fPt = fPtTempo;
fSize = size;
}
//_______________________________________________________________________________
void Reset(){
void Reset(){
for (int i = 0; i < fSize; i++)((char*) fPt)[i] = 0;
}
//_______________________________________________________________________________
char *GetPointer()const{
char *GetPointer()const{
return fPt;
}
//_______________________________________________________________________________
char GetValue(int i){
return (((char* )fPt)[i]);
unsigned char GetValue(int i){
return ((char)((char* )fPt)[i]);
}
//_______________________________________________________________________________
void SetValue(int i, char c){
void SetValue(int i, char c){
((char* )fPt)[i] = c;
}
//_______________________________________________________________________________
int GetSize() const{
int GetSize() const{
return fSize;
}
//_______________________________________________________________________________
......@@ -84,25 +130,108 @@ class UtilVector_c
return fUsedSize;
}
//_______________________________________________________________________________
void SetUsedSize(int usedsize){
void SetUsedSize(int usedsize){
fUsedSize = usedsize;
}
//_______________________________________________________________________________
void ResizeIfNecessary(int size) {
if (size > fSize) ReSize(size);
void ResizeIfNecessary(int size) {
if (size > fSize) ReSize(size);
}
//_______________________________________________________________________________
void Reset(int nb){
void Reset(int nb){
// reset only the nb first bytes
for (int i = 0; i < nb; i++)((char*) fPt)[i] = 0;
}
}
//_______________________________________________________________________________
void CopyAndResizeIfNecessary(char* givenPt,int size) {
void CopyAndResizeIfNecessary(char* givenPt,int size) {
// Copy data from a given point and resize our buffer if is not big enougth
ResizeIfNecessary(size);
memcpy (fPt,givenPt,size);
}
}
//_______________________________________________________________________________
void DumpRaw(void *point, int dumpsize, int increment=0,
std::string * mydump =NULL) const{
/// Creat a string of dump of memory space\n
/// point : pointer bo dump begin\n
/// if dumpsize =0 , dumpsize = standard = 256 \n
std::string *mydumploc;
if (mydump == NULL) {
std::string st;
mydumploc = &st;
} else {
mydumploc = mydump;
}
int i, k;
int nbrcol = 16; // nb de colonnes affich�es
int asciimin = 32; // range min of a char to be ascii character
char tempo[128] = "";
char chartmp = 0;
int asciimax = 127; // idem but max
int nbrperline = 16; // nbr of bytes per line
int nbrline = 0; // nbr lines
int dumpsize2 = dumpsize;
int dumpsize3 = dumpsize;
unsigned char *pChar = NULL;
unsigned char *pChar2 = NULL;
nbrline = (int) (dumpsize / nbrperline) + (int) ((dumpsize % nbrperline)
!= 0);
pChar = (unsigned char *) ((char*) point + increment);
pChar2 = pChar;
if (nbrline < 1)
nbrline = 1;
if (nbrcol > dumpsize)
nbrcol = dumpsize;
if (increment == dumpsize)
nbrline = 1;
for (i = 0; i < nbrline; i++) {
sprintf(tempo, "\n%5d %s ", increment, ": ");
*mydumploc += tempo;
for (k = 0; k < nbrcol; k++) {
sprintf(tempo, "%02hX ", (unsigned short) ((*(pChar2++))));
*mydumploc += tempo;
dumpsize3--;
if (dumpsize3 == 0)
break;
}
*mydumploc += " ";
for (k = 0; k < nbrcol; k++) {
chartmp = pChar[0];
//memcpy (&chartmp, pChar ,1);
if ((chartmp >= asciimin) && (chartmp <= asciimax)) {
sprintf(tempo, "%c", *pChar);
*mydumploc += tempo;
} else
*mydumploc += ".";
pChar++;
dumpsize2--;
if (dumpsize2 == 0)
break;
}
increment += nbrperline;
}
*mydumploc += "\n";
if (mydump == NULL)
std::cout << (*mydumploc).data();
}
//_______________________________________________________________________________
};// end of class
//_______________________________________________________________________________
#endif
......
......@@ -67,7 +67,7 @@ void MFMBasicFrame::SetHeaderBasic(MFM_basic_header* header) {
//_______________________________________________________________________________
void MFMBasicFrame::SetUserDataPointer(){
pUserData_char = pData_char+GetDefinedHeaderSize();
//pUserData_char= pData_char;
}
//_______________________________________________________________________________
void MFMBasicFrame::SetNbItemsFromFrameData() {
......@@ -149,7 +149,7 @@ void MFMBasicFrame::MFM_make_header(int unitBlock_size, int dataSource,
void MFMBasicFrame::GenerateAFrameExample(uint64_t timestamp,uint32_t eventnumber) {
/// Generate a example of frame with empty data
uint32_t unitBlock_size = GetDefinedUnitBlockSize();;
uint16_t type = GetWantedFrameType();
uint32_t itemsize =(uint32_t) GetItemSizeFromStructure(type);
......@@ -164,6 +164,7 @@ void MFMBasicFrame::GenerateAFrameExample(uint64_t timestamp,uint32_t eventnumbe
nbitem = fWantedItemsNumber;
if (framesize == 0) framesize = headersize + itemsize*nbitem;
if (framesize < headersize + itemsize*nbitem) framesize = headersize + itemsize*nbitem;
/*cout << " GenerateAFrameExample GetWantedFrameType = "<< GetWantedFrameType()<<"\n";
cout << " GenerateAFrameExample GetDefinedNbItems = "<< GetDefinedNbItems() <<"\n";
cout << " GenerateAFrameExample GetItemSizeFromStructure = "<< GetItemSizeFromStructure(type)<<"\n";
......@@ -185,12 +186,13 @@ if (fWantedItemsNumber<0)
nbitem = GetDefinedNbItems();
else
nbitem = fWantedItemsNumber;
uint32_t headersize = GetDefinedHeaderSize();
uint16_t type = GetWantedFrameType();
uint32_t itemsize =(uint32_t) GetItemSizeFromStructure(type);
uint32_t headersize = GetDefinedHeaderSize();
uint32_t itemsize = (uint32_t) GetItemSizeFromStructure(type);
SetFrameSizeFromFrameData();
if (GetFrameSize()<headersize + itemsize*nbitem)
fError.TreatError(3,0,"Frame size is not enough big");
if (GetFrameSize()<headersize + itemsize*nbitem){
fError.TreatError(3,0,"Frame size is not enough big");
}
FillDataWithRamdomValue(timestamp,eventnumber,nbitem);
}
//_______________________________________________________________________________
......
......@@ -9,7 +9,6 @@
#include "MFMCommonFrame.h"
#pragma pack(push, 1) // force alignment
#define MFM_BASIC_TYPE_TXT "MFM_BASIC_FRAME"
#define MFM_BASIC_DEFAULT_HEADERSIZE 16
#define MFM_DEFAULT_NB_ITEMS 20
//____________MFMBasicFrame___________________________________________________________
......
......@@ -43,11 +43,11 @@ void MFMCoboFrame::SetAttributs(void * pt) {
void MFMCoboFrame::SetTimeStampFromFrameData() {
// Compute and return Time Stamp
fTimeStamp = 0;
uint64_t * timeStamp = &(fTimeStamp);
uint64_t * ptimeStamp = &(fTimeStamp);
memcpy(((char*) (&fTimeStamp)),
((MFM_cobo_header*) pHeader)->coboEvtInfo.eventTime, 6);
if (fLocalIsBigEndian != fFrameIsBigEndian)
SwapInt64((timeStamp), 6);
SwapInt64((ptimeStamp), 6);
}
//_______________________________________________________________________________
int MFMCoboFrame::GetItemSizeFromStructure(int type)const {
......@@ -75,11 +75,11 @@ string MFMCoboFrame::GetHeaderDisplay(char* infotext) const{
void MFMCoboFrame::SetEventNumberFromFrameData() {
// compute and get Event Number
fEventNumber = 0;
char * eventNumber = (char*) &(fEventNumber);
char * peventNumber = (char*) &(fEventNumber);
//memcpy(&fEventNumber,((char*)((MFM_cobo_header*)pHeader)->coboEvtInfo.eventIdx),4);
fEventNumber = ((MFM_cobo_header*) pHeader)->coboEvtInfo.eventIdx;
if (fLocalIsBigEndian != fFrameIsBigEndian)
SwapInt32((uint32_t *) (eventNumber), 4);
SwapInt32((uint32_t *) (peventNumber), 4);
}
//_______________________________________________________________________________
void MFMCoboFrame::SetTimeStamp(uint64_t timestamp) {
......
......@@ -6,7 +6,9 @@
*/
#include "MFMBlobFrame.h"
#ifndef NO_MFMXML
#include <tinyxml.h>
#endif
#pragma pack(push, 1) // force alignment
......
......@@ -15,6 +15,7 @@
#include <sys/time.h>
using namespace std;
#include "MFMCommonFrame.h"
string MFMCommonFrame::indentation = "";
//_______________________________________________________________________________
MFMCommonFrame::MFMCommonFrame(int unitBlock_size, int dataSource,
......@@ -32,14 +33,14 @@ MFMCommonFrame::MFMCommonFrame(int unitBlock_size, int dataSource,
MFM_make_header(unitBlock_size, dataSource, frameType, revision, frameSize);
fFrameSize = frameSize;
}
};
//_______________________________________________________________________________
MFMCommonFrame::MFMCommonFrame() {
/// Constructor of a empty frame object
Init();
}
};
//_______________________________________________________________________________
MFMCommonFrame::~MFMCommonFrame() {
/// Destructor
......@@ -50,7 +51,7 @@ MFMCommonFrame::~MFMCommonFrame() {
pData_char = NULL;
pUserData_char = NULL;
}
}
};
//_______________________________________________________________________________
void MFMCommonFrame::Init() {
......@@ -82,12 +83,12 @@ void MFMCommonFrame::SetUserDataPointer()
{
SetHeaderSizeFromFrameData();
pUserData_char = pData_char + GetHeaderSize() +6*(int)(HasTimeStamp())+4*(int)(HasEventNumber());
}
};
//_______________________________________________________________________________
void MFMCommonFrame::SetHeader(MFM_topcommon_header* header) {
/// Set pointer of on header of frame\n
pHeader = header;
}
};
//_______________________________________________________________________________
void MFMCommonFrame::DumpRaw(int dumpsize, int increment) const{
///
......@@ -97,7 +98,7 @@ void MFMCommonFrame::DumpRaw(int dumpsize, int increment) const{
///
cout << (GetDumpRaw(dumpsize, increment)).data();
return;
}
};
//_______________________________________________________________________________
string MFMCommonFrame::GetDumpRaw(int dumpsize, int increment) const{
......@@ -137,7 +138,7 @@ string MFMCommonFrame::GetDumpRaw(int dumpsize, int increment) const{
//mydump += "\n\t end of bloc \n";
//}
return mydump;
}
};
//_______________________________________________________________________________
......@@ -368,7 +369,8 @@ string MFMCommonFrame::GetHeaderDisplay(char* infotext) const{
bool blob;
stringstream ss("");
ss << endl;
//ss << endl;
int type = GetFrameType();
if ((pHeader->hd.metaType & MFM_BLOBNESS_MSK) == 0)
blob = false;
else
......@@ -379,20 +381,25 @@ string MFMCommonFrame::GetHeaderDisplay(char* infotext) const{
ss << MFMCommonFrame::indentation << infotext;
ss <<MFMCommonFrame::indentation << " " << dec
<< GetFrameType() << hex << "(0x" << GetFrameType()
<< ") FrameSize=" << dec << GetFrameSize() << hex << "(0x" << GetFrameSize() << ")"
<<" MetaType=" << dec << (int) GetMetaType() << hex
<< "(0x" << (int) GetMetaType() << ")" << " B=" << blob
<< " UBS=" << dec << fSizeOfUnitBlock
<< type << hex << "(0x" << type << dec
<< ") FrameSize=" << GetFrameSize() << hex << "(0x" << GetFrameSize() << ")" << dec
<<" MetaType="<< (int) GetMetaType() << hex
<< "(0x" << (int) GetMetaType() << ")"<< dec << " B=" << blob
<< " UBS=" << fSizeOfUnitBlock
<< endl ;
if(HasEventNumber()||HasTimeStamp()) ss << MFMCommonFrame::indentation;
if(HasEventNumber()) ss << " EN = " << dec << GetEventNumber();
if(HasTimeStamp()) ss << " TS = " << dec << GetTimeStamp() << " (0x" << hex << GetTimeStamp() << ")";
if(HasBoardId()) ss << " Board =" << dec << GetBoardId() ;
if((GetShiftEN(type)>0) || (GetShiftTS(type)>0)) ss << MFMCommonFrame::indentation;
if((GetShiftEN(type)>0)) ss << " EN = " << dec << GetEventNumberFromCommonFrameData();
if((GetShiftTS(type)>0)) ss << " TS = " << dec << GetTimeStampFromCommonFrameData() << " (0x" << hex << GetTimeStampFromCommonFrameData() << ")"<< dec ;
//if(HasEventNumber()||HasTimeStamp()) ss << MFMCommonFrame::indentation;
//if(HasEventNumber()) ss << " EN2 = " << GetEventNumber();
//if(HasTimeStamp()) ss << " TS2 = " << GetTimeStamp() << " (0x" << hex << GetTimeStamp() << ")"<< dec ;
if(HasBoardId()) ss << " Board =" << GetBoardId() ;
ss <<MFMCommonFrame::indentation
<< " Source = " << dec << GetDataSource() << hex << "(0x"
<< GetDataSource() << ")" << " Rev = " << dec << (int) GetRevision() << hex
<< "(0x" << (int) GetRevision() << ")" ;
<< " Source = " << GetDataSource() << hex << "(0x"
<< GetDataSource() << ")"<< dec << " Rev = " << (int) GetRevision() << hex
<< "(0x" << (int) GetRevision() << ")"<< dec ;
//ss << " pointer = "<< (long long*) GetPointHeader();
ss<< endl;
......@@ -460,7 +467,7 @@ void MFMCommonFrame::MFM_fill_header(int unitBlock_size, int dataSource,
SetRevision((uint8_t) revision);
} else {
cout << " Error of header null\n";
cout << "MFMCommonFrame::MFM_fill_header , Error of header null\n";
}
}
//_______________________________________________________________________________
......@@ -472,7 +479,7 @@ void MFMCommonFrame::MFM_make_header(int unitBlock_size, int dataSource,
SetBufferSize(frameSize * unitBlock_size);
if (!pHeader)
cout << " Error of header null\n";
cout << "MFMCommonFrame::MFM_make_header , Error of header null\n";
MFM_fill_header(unitBlock_size, dataSource, frameType, revision, frameSize,
blob);
SetPointers();
......@@ -511,7 +518,6 @@ void MFMCommonFrame::SetPointers(void * pt) {
pData_char = (char*) pData;
SetUnitBlockSizeFromFrameData();
//SetUserDataPointer();
}
//_______________________________________________________________________________
void MFMCommonFrame::SetAttributs(void * pt) {
......@@ -528,6 +534,16 @@ void MFMCommonFrame::SetAttributs(void * pt) {
SetUserDataPointer();
}
//_______________________________________________________________________________
void MFMCommonFrame::CopyFrameAndResizeFrameIfNecessary(MFMCommonFrame* frame){
// resize Frame if necessary and copy vector in frame supposed to contain a MFM frame
frame->SetAttributs();
if (frame->GetFrameSize() > GetBufferSize()){
SetBufferSize(frame->GetFrameSize());
}
memcpy (GetDataPointer(),frame->GetDataPointer(),frame->GetFrameSize());
SetAttributs();
}
//_______________________________________________________________________________
void MFMCommonFrame::SetAttributsOn4Bytes(void * pt) {
/// Initialize a set of attributs (frame size, endianess, type ...) and pointers of frame\n
/// reading and computing data comming from header of frame\n
......@@ -540,11 +556,12 @@ void MFMCommonFrame::SetAttributsOn4Bytes(void * pt) {
SetFrameSizeFromFrameData();
}
//_______________________________________________________________________________
void MFMCommonFrame::ReadAttributsExtractFrame(int verbose,int dumpsize,void * pt){
void MFMCommonFrame::ReadAttributsExtractFrame(int verbose,int dumpsize,bool display,int noframe, void * pt){
// set attributs, fill stat and diplay information if display == true
SetAttributs(pt);
ExtractInfoFrame(verbose,dumpsize);
if (display )ExtractInfoFrame(verbose,dumpsize,noframe);
FillStat();
TestUserPointer();
TestUserPointer(noframe);
}
//_______________________________________________________________________________
......@@ -554,11 +571,12 @@ void MFMCommonFrame::WriteRandomFrame(int lun,int nbframe,int verbose,int dumps
uint64_t ts;
int verif;
uint32_t framesize = 0;
bool display = true;
SetWantedFrameType(type);
for (int i = 0; i < nbframe; i++) {
ts = GetTimeStampUs();
GenerateAFrameExample(ts, i);
ReadAttributsExtractFrame(verbose, dumpsize);
ReadAttributsExtractFrame(verbose, dumpsize,display,i);
framesize=GetFrameSize();
verif = write(lun, GetPointHeader(), framesize);
if (verif != framesize)
......@@ -684,6 +702,7 @@ int MFMCommonFrame::ReadInFile(int *fLun, char** vector, int * vectorsize) {
int count = 0;
int framesize = 0;
char* vectornew = NULL;
static long long int sumread =0;
int sizetoread = MFM_BLOB_HEADER_SIZE; // =8 count = read(fLun, (void*) vector, minsizeheader);
count = read(*fLun, (void*) (*vector), sizetoread);
if (count <= 0) {
......@@ -715,14 +734,20 @@ int MFMCommonFrame::ReadInFile(int *fLun, char** vector, int * vectorsize) {
if (count != sizetoread) {
cout << " Error in read file\n";
}
sumread +=framesize;
//if (sumread> 3000000000)
//cout << " debug read size "<<sumread<<" \n";
return framesize;
}
//_______________________________________________________________________________________________________________________
void MFMCommonFrame::ExtractInfoFrame(int verbose,int dumpsize){
void MFMCommonFrame::ExtractInfoFrame(int verbose,int dumpsize,int noframe){
// extract informations Frames and print informations
if ((verbose> 1) ) {
cout <<endl<< "--------------------- nb = " << dec<<noframe
<<"----------------------------------"<<endl;
HeaderDisplay();
if (verbose > 3 and dumpsize>0 ) {
int framesize = GetFrameSize();
......@@ -810,6 +835,217 @@ uint32_t MFMCommonFrame::GetEventNumber() const {
/// This value is computer by daugther class
return fEventNumber;
}
//_______________________________________________________________________________
int MFMCommonFrame::GetShiftEN(int type)const{
// return shift of EN in frame
// if 0 => no EN
int Shift = NUMEXO_EN_SHI ;//default value
if ( (type == MFM_COBOT_FRAME_TYPE)
or (type == MFM_OSCI_FRAME_TYPE)
or (type == MFM_EBY_TS_FRAME_TYPE)
or (type == MFM_MERGE_TS_FRAME_TYPE)
or (type == MFM_XML_DATA_DESCRIPTION_FRAME_TYPE)
or (type == MFM_XML_FILE_HEADER_FRAME_TYPE))
{ Shift = NO_EN; }
else if((type == MFM_COBO_FRAME_TYPE)
or (type == MFM_SCALER_DATA_FRAME_TYPE)
or (type == MFM_COBOF_FRAME_TYPE))
{ Shift = BAS_EN_SHI_INV; }
else if((type == MFM_EBY_EN_FRAME_TYPE)
or (type == MFM_EBY_EN_TS_FRAME_TYPE)
or (type == MFM_MERGE_EN_FRAME_TYPE))
{ Shift = BAS_EN_SHI; }
else if((type == MFM_NEDA_FRAME_TYPE)
or (type == MFM_SIRIUS_FRAME_TYPE)
or (type == MFM_REA_TRACE_FRAME_TYPE))
{ Shift = BAS_EN_SHI2; }
else if((type == MFM_MUTANT_FRAME_TYPE)
or (type == MFM_MUTANT1_FRAME_TYPE)
or (type == MFM_MUTANT2_FRAME_TYPE)
or (type == MFM_MUTANT3_FRAME_TYPE)
or (type == MFM_HELLO_FRAME_TYPE)
or (type == MFM_RIBF_DATA_FRAME_TYPE))
{ Shift = NUMEXO_EN_SHI_INV; }
return Shift;
}
//_______________________________________________________________________________
int MFMCommonFrame::GetShiftTS(int type)const{
// return shift of TS in frame
// if 0 => no TS
int Shift = NUMEXO_TS_SHI;//default value
if ( (type == MFM_COBOT_FRAME_TYPE)
or (type == MFM_OSCI_FRAME_TYPE)
or (type == MFM_EBY_EN_FRAME_TYPE)
or (type == MFM_MERGE_EN_FRAME_TYPE)
or (type == MFM_XML_DATA_DESCRIPTION_FRAME_TYPE)
or (type == MFM_XML_FILE_HEADER_FRAME_TYPE))
Shift = NO_TS;
else if ((type == MFM_COBO_FRAME_TYPE)
or (type == MFM_COBOF_FRAME_TYPE)