GENESIS: Documentation

Related Documentation:

Integrating new functionality into the G-Shell

Previously we created a solver object called PulseGen{}. In this document we will outline the process for adding our objects functionality to the gshell. Up to this point, the PulseGen{} Object should:

Now to make our solver object useable from the ghsell we must add code to some sections of the Perl module located in the directory:

Add the PulseGen{} Object to the Input Classes

Since the PulseGen{} is a standalone solver object, it must be imported into the gshell as an input class. To make the gshell aware of the presence of our solver object, we must add an entry for it to the module variable $all_inputclass_templates located in the file. Here we add a hash entry for our pulsegen object to the inputclass template variable.

our $all_inputclass_templates  
  = {  
    perfectclamp => {  
                      module_name => ’Experiment’,  
                      options => {  
                                  name => ’name of this inputclass’,  
                                  command => ’command value’,  
                      package => ’Experiment::PerfectClamp’,  
    pulsegen => {  
                  module_name => ’Experiment’,  
  options => {  
    name => ’name of this inputclass’,  
    width1 => ’First pulse width’,  
    level1 => ’First pulse level’,  
    delay1 => ’First pulse delay’,  
    width2 => ’Second pulse width’,  
    level2 => ’Second pulse level’,  
    delay2 => ’Second pulse delay’,  
    baselevel => ’The pulse base level’,  
    triggermode => ’The pulse triggermode, 0 - freerun, 1 - ext trig, 2 - ext gate’,  
                  package => ’Experiment::PulseGen’,  

Our entry is named pulsegen and should have three keys:

You can check to see if the gshell properly reads the template by typing list template_classes on the gshell prompt:

genesis > list inputclass_templates  
all input class templates:  
    module_name: Experiment  
      command: command value  
      name: name of this inputclass  
    package: Experiment::PerfectClamp  
    module_name: Experiment  
      baselevel: The pulse base level  
      delay1: First pulse delay  
      delay2: Second pulse delay  
      level1: First pulse level  
      level2: Second pulse level  
      name: name of this inputclass  
      triggermode: ’The pulse triggermode, 0 - freerun, 1 - ext trig, 2 - ext gate’  
      width1: First pulse width  
      width2: Second pulse width  
    package: Experiment::PulseGen