Previous Next        Current Page: NeXtMidas Training / Primitives / Lab 4 / Instructions
Start Here   
Background   
Common Midas Concepts   
Getting Started - Part 1   
Getting Started - Part 2   
Working with Files   
Option Trees   
Macros - Part 1 (Basics)   
Macros - Part 2 (Graphics)   
NetBeans - Part 1 (Setup)   
NetBeans - Part 2 (GUIs)   
NetBeans - Part 3 (Profiler)   
Eclipse - Part 1 (Setup)   
Eclipse - Part 2 (GUIs)   
Primitives   
   + Overview   
   + Open, Process, Close   
   + Building   
   + The NeXtMidas API   
   + Lab 1   
   + Special Variables   
   + Lab 2   
   + Lab 3*   
   + Files in a Primitive   
   - Lab 4   
      - Instructions   
      - Solution   
   + Lab 5*   
   + Test Macros   
   + Lab 6   
   + Real Time Controls   
   + Lab 7   
   + Working with Messages   
   + Lab 8   
   + Primitive Restarts   
   + Introduction to DSP   
   + Lab 9   
Applets & WebStart   
Maps & Imagery   
X-Midas Interoperability   
RMIF & Remoting   
Installing NeXtMidas   
Support & Maintenance   
File Handlers   


  • Lab 4:
    • Write a lite version of NOOP.
      nM> primlab4 <IN> <OUT>
    • Your primitive should take in a file and copy it to an output file.
      • There is no need to do any data reformatting, computations, or throttling.
      • You only need to work with Midas Blue files (i.e. DataFile) and pipes (which also use DataFile).
    • Tips:
      • Try using the MA.getDataFile(<name>, <file>, <flags>) method when getting the output file.
        • This will get a new file that has matching header information as another file (in this case the input file).
        • Since MA.getDataFile(<name>, <file>, <flags>) is only used when getting an output file there is no need to use the OUTPUT flag (you can just use 0 for <flags>).
        • Remember to open the input file, before using it here (as this will try to read the input file's headers).
    • Update the command dictionary and build the primitive.
    • Test your primitive.