1.  MoocNew()

     NAME
         MoocNew() startup mooc and acnet tasks

     SYNOPSIS
         include "moocan.h"
         STATUS MoocNew();

     DESCRIPTION

         This functions starts up all mooc and acnet tasks which are
         required to provide Acnet access. This should be called first
         before calling MoocAnNew(). This function will not return until all
         startup is complete which may take 10s of seconds. This function
         should be called first, before any other Mooc functions. You should
         only call this once. If you try to call it more than once, it
         returns ERROR.

     RETURNS
         0=OK or ERROR if you try to call this more than once

     AUTHOR
         Jeff Utterback

     SEE ALSO
         MoocAnNew()

                                 1-1



                           2.  MoocNewDum()

     NAME
         MoocNewDum() dummy version of MoocNew

     SYNOPSIS
         include "moocan.h"
         STATUS MoocNewDum();

     DESCRIPTION
         Dummy version of MoocNew() to be used when you dont want to
         fool with acnet for testing purposes.

     RETURNS
         Always returns OK

     AUTHOR
         Jeff Utterback

     SEE ALSO
         MoocAnNewDum()

                                 2-1



                          3.  MoocFtpDebug()

     NAME
         MoocFtpDebug() turn on or off mooc ftp and snapshot debug messages

     SYNOPSIS
         include "moocan.h"
         void MoocFtpDebug(int enaDis);

     DESCRIPTION
         Turns on or off the Mooc ftp and snapshot debug messages. You get
         lots of printfs to show you whats going in the plot.

         'enaDis'    0= debug msgs off
                 1= debug msgs on

         Note the front panel dip switch on the SSM board was originally
         used for turning on and off debug messages for mooc. It was
         layed out like this. Now debug msgs can be turned on and off using
         function calls added to libmoocan.
             switch 0= DAS debug now handled by MoocDasDebug()
             switch 1= alarmr debug now handled by MoocAlarmDebug()
             switch 2= slam debug now handled by MoocSlamDebug()
             switch 3= slam bypass now handled by MoocAlarmScan()
                     and MoocDeviceDownLoad()
             switch 4= ftpman debug now handled by MoocFtpDebug()

     RETURNS
         Always returns OK

     AUTHOR
         Jeff Utterback

     SEE ALSO
         MoocDasDebug() MoocSlamDebug()

                                 3-1



                         4.  MoocAlarmDebug()

     NAME
         MoocAlarmDebug() turn on or off mooc alarm debug messages

     SYNOPSIS
         include "moocan.h"
         void MoocAlarmDebug(int enaDis);

     DESCRIPTION
         Turns on or off the Mooc alarm debug messages. You get a printf
         msg every time an alarm goes good or bad.

         'enaDis'    0= debug msgs off
                 1= debug msgs on

         Note the front panel dip switch on the SSM board was originally
         used for turning on and off debug messages for mooc. It was
         layed out like this. Now debug msgs can be turned on and off using
         function calls added to libmoocan.
             switch 0= DAS debug now handled by MoocDasDebug()
             switch 1= alarmr debug now handled by MoocAlarmDebug()
             switch 2= slam debug now handled by MoocSlamDebug()
             switch 3= slam bypass now handled by MoocAlarmScan()
                     and MoocDeviceDownLoad()
             switch 4= ftpman debug now handled by MoocFtpDebug()

     RETURNS
         Always returns OK

     AUTHOR
         Jeff Utterback

     SEE ALSO
         MoocFtpDebug() MoocDasDebug() MoocSlamDebug()

                                 4-1



                          5.  MoocDasDebug()

     NAME
         MoocDasDebug() turn on or off mooc Data aquisition debug messages

     SYNOPSIS
         include "moocan.h"
         void MoocDasDebug(int enaDis);

     DESCRIPTION
         Turns on or off the Mooc data aquistion debug messages. You get
         printfs every time ACNET accesses any data on your ebedded sys.

         'enaDis'    0= debug msgs off
                 1= debug msgs on

         Note the front panel dip switch on the SSM board was originally
         used for turning on and off debug messages for mooc. It was
         layed out like this. Now debug msgs can be turned on and off using
         function calls added to libmoocan.
             switch 0= DAS debug now handled by MoocDasDebug()
             switch 1= alarmr debug now handled by MoocAlarmDebug()
             switch 2= slam debug now handled by MoocSlamDebug()
             switch 3= slam bypass now handled by MoocAlarmScan()
                     and MoocDeviceDownLoad()
             switch 4= ftpman debug now handled by MoocFtpDebug()

     AUTHOR
         Jeff Utterback

     SEE ALSO
         MoocFtpDebug() MoocSlamDebug()

                                 5-1



                           6.  MoocAnNew()

     NAME
     MoocAnNew() - instantiates a mooc "An" Class Object

     SYNOPSIS
         #include "moocan.h"
         STATUS MoocAnNew(AnObjId_t anObjId)

     DESCRIPTION

         This function takes the necessary steps to initialize the mooc
         "An" Class and to instantiate one mooc "An" Class object. After
         this function is called, the data associated with the anObjId can
         be accessed via Acnet using a parameter page or a custom console
         application page.

         Before calling this function MoocNew() must be called to
         startup the necessary mooc and acnet tasks. Also, AnxxxxxxNew()
         must be called in order to set up the 'anObjId' structure.  This
         function is closely associated with liban by Ken Fullett. See the
         documentation for liban.

         When created Acnet devices using Dabbel, the mooc OID (object ID)
         supplied in 'anObjId' must match the OID in the SSDN of the Acnet
         data base device. This function may be called several times to
         instantiate several objects. Each time it is called, a different
         OID must be supplied in the anObjId.

         Each "An" class object may have up to 256 channels which means that
         you may have 256 data base device names using the same OID but
         using different channel numbers in the SSDN. Each channel may have
         a sigle datum or an array of data associated with it. This array
         data can be accessed on a parameter page using the Z:TSTDEV[33]
         notation. Arrays can be accessed in a more flexible way using a
         custom console application page. Each channel of an "An" class
         object can have but are not required to have reading, setting,
         basic status, and basic control properties.

         'anObjId' a pointer to a AnObjId_t structure. This structure needs
         to be fully initialized before calling this function. 'anObjId' can
         be easily generated by first calling AnxxxxNew() See the
         documentation for liban by Ken Fullett.

     RETURNS
         OK or ERROR if revs don't match or if couldn't create class or
         instance

                                 6-1



     EXAMPLES
         #define NCHAN 50
         #define NELMTBSC 1
         #define NELMTRS 10
         #define MOOC_OID 22
         AnIntFltId_t  intFltId;

         MoocNew();
        intFltId = AnIntFltNew("sam", MOOC_OID, AnTypInt_e, NCHAN,
                              NELMTRS, NELMTBSC);
         MoocAnNew(intFltId);
         // now if you have the dabbel entries made you can access data
         // from a parameter page

     FILES
         andev.c libmoocan.o

     AUTHOR
         Jeff Utterback

     SEE ALSO
         MoocNew() MoocAnNewDum() liban

                                 6-2



                           7.  MoocAnDel()

     NAME
         MoocAnDel() - deletes an instance of a mooc "An" Class Object

     SYNOPSIS
         #include "moocan.h"
         STATUS MoocAnDel(AnObjId_t anObjId)

     DESCRIPTION
         Warning: this function has not been fully tested. Preliminary
         tests show that bad things happen when you delete an instance.
         SLAM tends to crash when alarm scanning is on.

         Deletes a mooc "An" class object which was created with
         MoocAnNew(). After calling this function, all ACNET access to this
         object is disabled.

         'anObjId' a pointer to a AnObjId_t structure.

     RETURNS
         OK or ERROR if couldn't delete instance

     EXAMPLES
         #define NCHAN 50
         #define NELMTBSC 1
         #define NELMTRS 10
         #define MOOC_OID 22
         AnIntFltId_t  intFltId;

         MoocNew();
        intFltId = AnIntFltNew("sam", MOOC_OID, AnTypInt_e, NCHAN,
                              NELMTRS, NELMTBSC);
         MoocAnNew(intFltId);
         // now if you have the dabbel entries made you can access data
         // from a parameter page
         MoocAnDel(intFltId); // no more Acnet Access

     FILES
         andev.c libmoocan.o

     AUTHOR
         Jeff Utterback

     SEE ALSO
         MoocNew() MoocAnNew()

                                 7-1



                          8.  MoocAnNewDum()

     NAME
     MoocAnNewDum() - dummy version of MoocAnNew

     SYNOPSIS
         #include "moocan.h"
         STATUS MoocAnNewDum(AnObjId_t anObjId)

     DESCRIPTION Does nothing and returns OK. Dummy version of MoocAnNew,
     to be used when you don't want to startup acnet.

     RETURNS
         always OK

     AUTHOR
         Jeff Utterback

     SEE ALSO
         MoocAnNew()

                                 8-1



                         9.  MoocSlamDebug()

     NAME
         MoocSlamDebug() enable or disable slam debug messages

     SYNOPSIS
         #include moocan.h
         void MoocSlamDebug(int enaDis);

     DESCRIPTION

         This function turns on or off the mooc slam debug printf messages.
         0=off 1=on. Slam is the task which deals with setting and alarm
         download and alarm scanning. Debug printfs are off by default.

         'enaDis' 0= debug printfs are OFF
                     1= debug printfs are ON

     EXAMPLES
         MoocSlamDebug(0);  //turn off debug printfs
         MoocSlamDebug(1);  // turn on debug printfs

     AUTHOR
         Jeff Utterback

     SEE ALSO

                                 9-1



                         10.  MoocAlarmScan()

     NAME
         MoocAlarmScan() enable or disable alarm scan

     SYNOPSIS
         #include moocan.h
         void MoocAlarmScan(int enaDis);

     DESCRIPTION

         This function turns on or off the mooc alarm scan. Alarm scan is
         on by default.  But, alarm download is off by default so front-ends
	 that do not have alarms or do not want to scan them should just leave
	 alarm download disabled.

         This function should be called after MoocNew() and after
         MoocAnNew() so that the devices which are envolved in alarms
         are completely set up.

         'enaDis' 0= alarm scan is OFF
                     1= alarm scan is ON

     EXAMPLES
         MoocAlarmScan(0);  //turn off scan
         MoocAlarmScan(1);  // turn on scan

     AUTHOR
         Jeff Utterback

     SEE ALSO

                                 10-1



                      11.  MoocDeviceDownLoad()

     NAME
         MoocDeviceDownLoad() enable or disable setting and alarm download

     SYNOPSIS
         #include moocan.h
         void MoocDeviceDownLoad(int enaDis);

     DESCRIPTION

         When a mooc system boots up, the mooc system can ask Acnet for a
         download of the most recent settings and alarm limits. This feature
         must be set up on console page D121 for each new mooc system. Ask
         the D121 keeper for additional info.

         This function turns on or off the mooc setting and alarm download
         handler. The download handler makes download requests to Acnet when
         the settings and alarm limits are needed. The download handler is
         off by default, so that systems which don't use alarms and/or
         settings will not be asking for downloads. After this function is
         called to turn on the download handler there is generally no need
         to ever turn it off. Most systems will simply turn on the download
         handler and leave it on.

         This function should be called after MoocNew() and after
         MoocAnNew() so that the devices which are envolved in the download
         are completely set up, before an attempt to download their settings
         is made.

         'enaDis' 0= don't ask ACNET to download settings and limits
                     1= ask ACNET to download settings and limits

         Each time this function is called with enaDis=1, the embedded sys
         will request that the settings and limits be downloaded again. This
         feature is useful when new devices are being created "on the fly"
         with MoocAnNew().  In order to get the settings and limits
         downloaded into a device newly created with MoocAnNew(),
         MoocDeviceDownLoad() must be called.

     EXAMPLES
         MoocDeviceDownLoad(0);  //turn off download request (used rarely)
         MoocDeviceDownLoad(1);   //ask ACNET to download settings and limits

     AUTHOR
         Jeff Utterback

     SEE ALSO

                                 11-1



         MoocNew() MoocAnNew()

                                 11-2



                               CONTENTS

      1.  MoocNew()........................................   1-1

      2.  MoocNewDum().....................................   2-1

      3.  MoocFtpDebug()...................................   3-1

      4.  MoocAlarmDebug().................................   4-1

      5.  MoocDasDebug()...................................   5-1

      6.  MoocAnNew()......................................   6-1

      7.  MoocAnDel()......................................   7-1

      8.  MoocAnNewDum()...................................   8-1

      9.  MoocSlamDebug()..................................   9-1

     10.  MoocAlarmScan()..................................  10-1

     11.  MoocDeviceDownLoad().............................  11-1

                                - i -