check/compare machine datatypes
This commit is contained in:
parent
9b0dd5e7d7
commit
083db81f4e
@ -53,6 +53,16 @@ struct block {
|
|||||||
|
|
||||||
// https://zone.ni.com/reference/de-XX/help/370858P-0113/tdmdatamodel/tdmdatamodel/tdm_header_tdx_data/
|
// https://zone.ni.com/reference/de-XX/help/370858P-0113/tdmdatamodel/tdmdatamodel/tdm_header_tdx_data/
|
||||||
|
|
||||||
|
enum class tdmdatatype {
|
||||||
|
eInt16Usi,
|
||||||
|
eInt32Usi,
|
||||||
|
eUInt8Usi,
|
||||||
|
eUInt16Usi,
|
||||||
|
eUInt32Usi,
|
||||||
|
eFloat32Usi,
|
||||||
|
eFloat64Usi
|
||||||
|
};
|
||||||
|
|
||||||
struct tdm_datatype {
|
struct tdm_datatype {
|
||||||
|
|
||||||
std::string name_;
|
std::string name_;
|
||||||
|
@ -76,6 +76,41 @@ class tdm_reaper
|
|||||||
return listofids;
|
return listofids;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
// check machine's datatypes
|
||||||
|
// https://en.cppreference.com/w/cpp/language/types
|
||||||
|
void check_local_datatypes()
|
||||||
|
{
|
||||||
|
std::cout<<"\nmachine's C++ datatypes:\n";
|
||||||
|
std::cout<<std::setw(25)<<std::left<<"char:"
|
||||||
|
<<std::setw(5)<<std::left<<sizeof(char)<<"byte(s)\n"
|
||||||
|
<<std::setw(25)<<std::left<<"uint8_t:"
|
||||||
|
<<std::setw(5)<<std::left<<sizeof(uint8_t)<<"byte(s)\n"
|
||||||
|
|
||||||
|
<<std::setw(25)<<std::left<<"short int:"
|
||||||
|
<<std::setw(5)<<std::left<<sizeof(short int)<<"byte(s)\n"
|
||||||
|
<<std::setw(25)<<std::left<<"unsigned short int:"
|
||||||
|
<<std::setw(5)<<std::left<<sizeof(unsigned short int)<<"byte(s)\n"
|
||||||
|
|
||||||
|
<<std::setw(25)<<std::left<<"int:"
|
||||||
|
<<std::setw(5)<<std::left<<sizeof(int)<<"byte(s)\n"
|
||||||
|
<<std::setw(25)<<std::left<<"unsigned int:"
|
||||||
|
<<std::setw(5)<<std::left<<sizeof(unsigned int)<<"byte(s)\n"
|
||||||
|
|
||||||
|
<<std::setw(25)<<std::left<<"long int:"
|
||||||
|
<<std::setw(5)<<std::left<<sizeof(long int)<<"byte(s)\n"
|
||||||
|
<<std::setw(25)<<std::left<<"unsigned long int:"
|
||||||
|
<<std::setw(5)<<std::left<<sizeof(unsigned long int)<<"byte(s)\n"
|
||||||
|
|
||||||
|
<<std::setw(25)<<std::left<<"float:"
|
||||||
|
<<std::setw(5)<<std::left<<sizeof(float)<<"byte(s)\n"
|
||||||
|
<<std::setw(25)<<std::left<<"double:"
|
||||||
|
<<std::setw(5)<<std::left<<sizeof(double)<<"byte(s)\n"
|
||||||
|
<<std::setw(25)<<std::left<<"long double:"
|
||||||
|
<<std::setw(5)<<std::left<<sizeof(long double)<<"byte(s)\n\n";
|
||||||
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
// encoding
|
// encoding
|
||||||
|
2
makefile
2
makefile
@ -35,7 +35,7 @@ uninstall : $(INST)/$(EXE)
|
|||||||
rm $<
|
rm $<
|
||||||
|
|
||||||
# build main.cpp object file and include git version/commit tag
|
# build main.cpp object file and include git version/commit tag
|
||||||
main.o : src/main.cpp
|
main.o : src/main.cpp lib/$(SRC).hpp
|
||||||
@cp $< $<.cpp
|
@cp $< $<.cpp
|
||||||
@sed -i 's/TAGSTRING/$(GTAG)/g' $<.cpp
|
@sed -i 's/TAGSTRING/$(GTAG)/g' $<.cpp
|
||||||
@sed -i 's/HASHSTRING/$(GHSH)/g' $<.cpp
|
@sed -i 's/HASHSTRING/$(GHSH)/g' $<.cpp
|
||||||
|
@ -185,6 +185,9 @@ int main(int argc, char* argv[])
|
|||||||
+ e.what() );
|
+ e.what() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// check available datatypes on machine
|
||||||
|
jack.check_local_datatypes();
|
||||||
|
|
||||||
std::vector<std::string> chgrids = jack.get_channelgroup_ids();
|
std::vector<std::string> chgrids = jack.get_channelgroup_ids();
|
||||||
for ( auto el: chgrids ) std::cout<<el<<",";
|
for ( auto el: chgrids ) std::cout<<el<<",";
|
||||||
std::cout<<"\n\n";
|
std::cout<<"\n\n";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user