1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
-
-
-
-
-
-
- #include "Lemma"
-
- using namespace Lemma;
-
- #ifdef HAVE_YAMLCPP
- #include "yaml-cpp/yaml.h"
-
- int main() {
-
- std::ofstream ofstr("output.yaml");
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- TEMTransmitter* Seq = TEMTransmitter::New();
- Seq->SetRepFrequency( 20, KHZ );
- VectorXr Times (18);
- VectorXr Amps (18);
- Times << 0.0, 0.03051, 0.10267, 0.19408, 0.19889, 0.21332, 0.74249, 1.3775, 1.83452, 2.52245, \
- 3.191132, 3.9031135, 4.0, 4.00484486, 4.123904, 4.200182, 4.20732, 4.212946;
- Amps << 0.0, 14.71872, 62.34372, 114.84372, 117.84372, 118.96872, 118.96872, 118.96872, 118.96872,\
- 118.59372, 119.34372, 120.0, 120.0, 117.94176, 47.60364, 0.8905848, 0.1203888, 0.0;
- Seq->SetWaveform(Times, Amps, MILLISEC);
-
- ofstr << *Seq ;
- ofstr.close();
- Seq->Delete();
-
-
-
- std::ifstream ifstr("output.yaml");
- std::vector<YAML::Node> nodes = YAML::LoadAll(ifstr);
-
- TEMTransmitter* Seq2 = TEMTransmitter::DeSerialize( nodes[0] );
- std::cout << "Loaded\n" << *Seq2;
- Seq2->Delete();
- ifstr.close();
-
-
-
-
-
- exit(EXIT_SUCCESS);
- }
-
- #else
- int main() {
-
- }
- #endif
|