Adtec API Help

# DPI Ad Server Release Notes
    Updated:  April 30, 2009
    Copyright Adtec Digital, Inc. 2007, All rights reserved.
    http://www.adtecinc.com/
-------------------------------------- ## Known Issues
    1) Netset configuration from menu limited to one for each channel.
    2) Largefile support untested.
    3) Corrupted configuration files cause crashes.
    4) No overflow protection for additional inserts beyond transport multiplex
       rate (TMR).
    5) Updating from 1.01.XX to 1.02.XX will cause loss of netsets configuration!
       All netsets will default to inactive.
    6) Rollback to earlier releases (v1.01.16, v1.01.15) will fail to boot. The
       work around is a manual patch of older version or "boot secondary" at the
       bootloader's boot prompt.
    7) Scheduler will become unresponsive to commands after handling many commands.
       This is believed to be associated with the number of commands handled, but
       may have something to do with the timing of commands.
    8) When setting endby NETAVAILSPOT, DPI fails insertions if used with BMR splicer.
    10)DPI will only insert 6 channels concurrently at 5+ Megabits per second when
       used with BMR splicer.
-------------------------------------- ## Version 1.03.00, Internal release, April 30, 2009. JT
    1) Incorporated new development for system processes which may include
       corrections for some errors. No change to standard DPI processes.
## Version 1.02.18, Release Candidate, November 12, 2008. MG
    1) Correct documentation for CHANNELSTATUS command.
    2) Added new command, RESETTONEBOARD, to reset the tone board when it fails to
       respond to tones.
-------------------------------------- ## Version 1.02.17, Release Candidate, October 30, 2008. MG
    1) Fixed trigger handling from the tone board (MID 2230).
    2) Modified repsonses to items in the CUE MENU to avoid lockup (MID 2329).
    3) Added command CHANNELSTATUS to retrieve the status of the channels (MID 2305).
-------------------------------------- ## Version 1.02.16, Release Candidate, October 13, 2008. JT
    1) Updated FPGA image used in build for compatibitility with hardware changes
       which should mitigate relay chatter.
-------------------------------------- ## Version 1.02.15, Release Candidate, September 30, 2008. JT
    1) Modified RDY report to add leading zeros to file sizes for TBGS
       compatibility.
-------------------------------------- ## Version 1.02.14, Release Candidate, August 26, 2008. JT
    1) Corrected bug in SCTE35 out triggers (from 1.02.13).
-------------------------------------- ## Version 1.02.13, Release Candidate, August 25, 2008. JT
    1) Removed max bit rate and min bit rate from splice request elementary
       streams per request from Motorola to avoid a bug in their splicer.
    2) Corrected MAKEDEV script to create stream device nodes by forcing a decimal
       value interperetation.
    3) Corrected RDY_DIR and MVL_DIR in the rdy script (MID 2253).
    4) Corrected case sensitivity to "CCMS" in the transfer script (MID 3368).
    5) Corrected menu defintion which prevented setting parsing format to 20/20
       (MID 2198).
    6) Corrected Schedule ID menu items to limit to numbers only (MID 2161).
    7) Corrected SCTE35 trigger handling to recognize "end" (aka "out") triggers.
-------------------------------------- ## Version 1.02.12, Internal release, March 20, 2008. JT
    1) Brought in some changes from other related projects. Primarily, support
       for the PC73A front panel.
    2) Corrected bug in menus for parsing format. "20/20" should work now.
    3) Added SPLICERABORT/SAB/Z9 command to cancel the active splice on a channel.
-------------------------------------- ## Version 1.02.11, Internal release, ??? ??, 2007. DO
    1) Corrected problem when DPI outputs a transport stream with high PCR jitter.
        DPI was misshandling DVB and MPEG tables in the transport stream.
    2) Corrrected case when DPI was not handling adaptation field equal to zero.
-------------------------------------- ## Version 1.02.10, Internal release, May 7, 2007. DO
    1) Corrected problem when DPI outputs a transport stream with high PCR jitter.
        DPI was misshandling DVB and MPEG tables in the transport stream.
    2) Corrrected case when DPI was not handling adaptation field equal to zero.
-------------------------------------- ## Version 1.02.09, Internal release, May 7, 2007. DO
    1) Corrected problem in the schedule when a schedule file was loaded. DPI was
       skipping an insertion line every 50 lines.
    2) Corrected crash when a schedule spot was deleted from the media folder.
    3) Added file locking mechanism to prevent conflicts regsitration, mirroring and
       playback.
    4) Corrected crash when NST command was issued. The system can handle more
       throughput for command handling information.
    5) Added more info in the log file to explain why a spot was not schedule (ex:
       spot was not found, insertion triggered out of the available window time. etc)
    6) DPI cpu usage has more idle time since the soft interrupt process is not
       triggered constanlty and the file registration process is smarter.
    7) Appropiate handling of renaming and deleting files for file registration process.
-------------------------------------- ## Version 1.02.08, Internal release, May 7, 2007. DO
    1) Added NETAVAILSPOT endby functionality. Insertions can be aborted either
       by time available, or stop condition and spot end.
    2) Added default schedules for all channels to be used when there is no current
       schedule file available. The file pattern for the default schedule is 000CCHHH.SCH
       where "CC" is the channel number and "HHH" is the head ID number for the
       channel.
    3) Added loading information in the verification file. The verification file will show
       previous times and the name of schedule files loaded.
    4) Maximum Transport Rate (TMR) command added. The TMR command will save
       the transport rate in a configuration file in order to keep TMR settings after
       rebooting.

       @section dpitransportMuxRateDesc Description:
       @verbatim
          Display or Modify the current transport multiplex rate setting (in bits/sec)
        If no argument is given, then the current setting is displayed. If an argument
        is given, the setting is modified.
## Form:
         Command Handler: DPID
         <UNIT NAME> TRANSMUXRATE|TMR|TM [RATE]
         Argument List:
         [RATE]   Maximum rate for transport stream output.
## Response:
        MODIFY RESPONSE
           Verbose- "OK\r\n" to acknowledge receipt of command, or
                    "ERROR- [Description]\r\n" if error, ending command
           Terse-   "0\r\n" to acknowledge receipt of command, or
                    "[1-255]\r\n" if error, ending command
           "\r\n" concludes modify responses (empty line)
        DISPLAY RESPONSE
           Verbose- "OK\r\n" to acknowledge receipt of command, followed by
                    "Transport Mux Rate= [RATE]\r\n", or
                    "ERROR- [Description]\r\n" if error, ending command
           Terse-   "0\r\n" to acknowledge receipt of command, followed by
                    "[RATE]\r\n", or
                    "[1-255]\r\n" if error, ending command
           "\r\n" concludes display responses (empty line)
## Examples:
         Verbose command to retrieve current setting:
         *.DPID TRANSMUXRATE <enter>
            Response is: OK\r\n
            100000000\r\n

         Terse command to retrieve current setting:
         *.DPID TR <enter>
            Response is: 0\r\n
            100000000\r\n
## Notes:
## Products Supporting Command: DPI 1200 5) Corrected problem when SCH file was loaded with the wrong head end ID but same date. If the file head end ID is changed and the file date is the same, the schedule will be clear. -------------------------------------- ## Version 1.02.07, Release, February 7, 2007. JT
    1) Corrected error in reading from tone board. Ocasionally, this would cause
       missed tone triggers.
    2) Added menu items for netset mode, days on, avail, and end by.
    3) Corrected crash in chnlmgr due to accessing the scheduler socket before
       it is fully connected.
-------------------------------------- ## Version 1.02.06, Internal Release, February 2, 2007. JT
    1) Slight correction to mirror to handle STARTUP variable.
    2) Corrected bugs in trgrd that prevented reliable modification of netset type
       and input index. Now, type changes and input changes are functional.
-------------------------------------- ## Version 1.02.05, Internal Release, January 30, 2007. JT
    1) Using "latest" kernel and modules including: pnp, frpanel, dpi-iolite,
       dpi-file2asi.
    2) Included mirror corrections in build that already existed in other branches.
    3) Added alternate method for failed drive detection to raidman.
    4) Mirroring will not pull schedules for channels whose mode is off.
    5) Added SHELLCMD command and filled in API documentation for several commands
       that are available to DPI.
    6) Corrected chnlmgr socket maintenance related to trgrd that had a file
       descriptor leak.
-------------------------------------- ## Version 1.02.04, Release Candidate, January 22, 2007. JT
    1) When updating applications, vrsn only "toggles the boot partition" if it
       detects a proper alignment of partition /dev/hde2. This problem would cause
       misaligned partitions to fail to boot from secondary partition for
       (unreleased) versions 1.02.03, 1.02.02, 1.02.01, 1.02.00.
    2) Merged changes from HEAD including mounter and config.sh which perform
       raidstart and remove /media/hd0 when no hard-drive found at boot. This
       prevents filling up the CF by thinking that it is a larger hard drive.
    3) Modified /srv/www/html/css/style.css to include left alignment for pre.
    4) FTP server now listens to default port (21) instead of port 79.
-------------------------------------- ## Version 1.02.03, Release Candidate, January 19, 2007. JT
    1) Corrected crash related to attempting insertion of a program stream.
    2) Corrected scheduler socket handling during boot which could cause chnlmgr
       to crash.
    3) Improved NETSET and CNV command handling for bad input.
    4) Corrected minor error in vrsn script when deleting. Also prevent deleting
       current version inadvertently by deleting a parent directory.
    5) Corrections to NETSET argument handling.
    6) Added schedule validation to load process.
    7) Added HTML pages including API documentation and release notes.
-------------------------------------- ## Version 1.02.02, Release Candidate, January 10, 2007. JT
    1) Added "--nocom2" to cmld startup script for DPI.
    2) Corrected possible crash when loading configuration.
    3) Schedule file monitoring improved to handle deleted schedules properly.
-------------------------------------- ## Version 1.02.01, Release Candidate, January 5, 2007. JT
    1) Multiple simultaneous triggers are now dispatched promptly.
    2) SCTE35 triggers are not controlled by netsets.
    3) SCTE35 events and Native Mode schedule time events are under netset
       control.
-------------------------------------- ## Version 1.01.16, Release, December 15, 2006. JT
    1) Corrected crash in scheduler during updateSpotStatus() near day roll-over.
    2) Increased bounds checking to using an invalid index.
    3) Explicit setting of "sender" in chnlmgr for IPC socket writes.
    4) System scheduler corrected ordering of month and day fields.
    5) Unknown commands to dpid now cause "?" response.
    6) Corrected memory leak in command handling.
-------------------------------------- ## Version 1.01.14, Release, November 13, 2006. JT
    1) Corrected environment for boot-time mirrord start script by sourcing
       /etc/profile.
    2) Included default schedule configuration to prevent crash.
    3) Slightly modified logging to include space between log ID and message.
    4) Modified boot parameters to include piomode=4.
-------------------------------------- ## Version 1.01.13, Release, November 02, 2006. JT
    1) Corrected memory leak in message helper objects.
    2) Updated API structure, aded some commands.
    3) Removed modules from CVS.  Pulled from BSP and app.
    4) Fixed bug in SIGCHLD handling that was using the wrong variable for
       outputting logs and diagnotics.
    5) Update CFG strings for command SCH.
    6) Changed API terse description (1-255) to NON_ZERO NUMERIC VALUE.
    7) Added 'space' between the ID and the text message for log output.
    8) Fixed process ID leak when checking NTP status.
    @verbatim

    --------------------------------------
    @section dpiV1-02-00 Version 1.02.00, Internal. October 30, 2006. JT
    @verbatim
    1) Initial move towards reworked trgrd.
-------------------------------------- ## Version 1.01.12, Release Candidate, October 26, 2006. JT
    1) Cleaned up todo's in code.
    2) Clarification: The last several builds (since v1.01.08, I believe) have
       included file registration and insertion capability for ETV components.
    3) Edited API documentation.
    4) Included newest modules. frpanel added /proc/drivers/frpanel/.
    5) Corrected "CNV V" at some point in the past few releases.
-------------------------------------- ## Version 1.01.11, Release Candidate, October 24, 2006. JT
    1) Corrected ntpq path and inclusion in build.
    2) Cleaned up todo's in code.
    3) Clarification: The last several builds (since v1.01.08, I believe) have
       included file registration and insertion capability for ETV components.
-------------------------------------- ## Version 1.01.10, Release Candidate, October 19, 2006. JT
    1) Modified kernel for improved frpanel and LED operation
    2) RDY process (part of CCMS mirroring) optimized for speed.
    3) Mirror logging made more terse.
    4) Corrected upload of previous day's VER after day roll.
    5) Corrected bug in trgrd which cause occasional false triggers.
    6) TRANSPORT command added to view individual channel splice states.
    7) Added mode to netsets so they can be set to off/inactive.
    8) Corrected formatting for THS command.
    9) Corrected bug in logging that could cause a process to crash.
-------------------------------------- ## Version 1.01.09, Release Candidate, October ??, 2006. JT
    1) Switched build procedure to more automated script. This should increase
       build reliability and repeatability.
    2) Corrected filename for verification file upload.
    3) SCTE35 "immediate mode" triggers are set to 4 seconds preroll.
-------------------------------------- ## Version 1.01.08, Release Candidate, September 29, 2006. JT
    1) Added dynamic timezone info compiler.
    2) Modified directory structure to support mulitple, dynamic storage. All
       mount points are located in /media. The mount points should indicate
       type, such as hd0 for first hard-drive, nas0 for first network storage.
       If certain directories exist on the primary storage, links will be created
       in user home directories to these locations. Example, /media/hd0/log will
       be linked to by /var/log and /home/adtec/log. The list of recognized
       directories is: media, log, sch, ver, list, dvc,...
    3) Modified scheduler to use threads for loading, prefetching and saving files.
       Modified chnlmgr-scheduler IPC to use sockets. Scheduler's "build playlist"
       thread should be nice enough to respond to 12 simultaneous triggers within
       1.5 seconds.
    4) Corrected channel enable configuration for proper start-up initialization.
       Also corrected the LED state to OFF when the channel is disabled (it had
       flashing red).
    5) Setting splicer configuration to current value no longer resets the splicer
       control connection (SCTE30).
    6) Aired time field in verifications now shows accurate start time for each
       spot. (Previously, this had reflected the trigger time.)
    7) CCMS mirroring now only downloads content from "MasterVideoLibrary2"
       directory on server. The idea is that this directory can be reserved for
       "spts"-only files in environment with mixed content.
    8) Spot ID format parsing configuration and channelmode configuration exposed
       to menu.
    9) Corrected a crash in chnlmgr due to a "general response" SCTE30 message.
    10) Corrected stall in DPI DMA driver which would cause all streams to block
        until system reset. This would occur randomly after running for several
        days.
    11) Minor correction to mirroring which caused problems with media downloads.
-------------------------------------- ## Version 1.01.07, Development, August ??, 2006. JT
    1) Modified menu structure to add tables and submenus.
    2) Added channel mode configuration and native mode ID configuration.
-------------------------------------- ## Version 1.01.05, Development, August 3, 2006. JT
    1) Private PID splicing enhancement for ETV application.
    2) Modified menus for additional netset configuration.
-------------------------------------- ## Version 1.01.04, Release Candidate, August 1, 2006. JT
    1) Linux kernel 2.6 with new DMA module for high performance. Default ASI rate
       is 150 Mbps.
    2) Replaced streamer with less "greedy" build.
    4) For each input, there is the first netset is for tones and the second is for
       GPI. Netsets support fields for preroll and start condition.
    3) Commands supported include:

       CCMSNATIVE/CNV/CN C <index> [<cchhh>]
          View or set schedule identifier for channel, where "cc" represents channel
          ID and "hhh" represents the headend ID.
       CCMSNATIVE/CNV/CN P <index> [<format>]
          View or set parsing format for spot ID. Allowed values are "novar",
          "20/20", "raw".
       NETSET/NST/NS <channel_index> <input_index> [TYPE|STARTCOND|PREROLL]
          View or set netset parameters.
          Arguments:
             TYPE - At this time, this is a read-only parameter. Values are "tone"
    	    and "gpi"
             STARTCOND - For tone, this is the start tone sequence. For gpi, valid
    	    values are OPEN, CLOSED, NONE.
             PREROLL - This is the preroll value in milliseconds.
       CHANNELNAME/CLN/Z1 <index> [<name>]
          View or set splicer configuration for channel name. Value for name can be
          enclosed in double-quotes ("aaa bbb") to maintain spaces in value.
       SPLICERCARD/SCA/Z2 <index> [<card_index>]
          View or set splicer configuration for splicer card.
       SPLICERCHASSIS/SCS/Z3 <index> [<chassis_index>]
          View or set splicer configuration for splicer name.
       SPLICERIPADDRESS/SIA/Z4 <index> [<ip_address>]
          View or set splicer IP address.
       SPLICERNAME/SPN/Z5 <index> [<name>]
          View or set splicer configuration for splicer name. Value for name can be
          enclosed in double-quotes ("aaa bbb") to maintain spaces in value.
       SPLICERPORT/SP0/Z6 <index> [<port_index>]
          View or set splicer configuration for splicer port.

       IPADDRESS/IPA/IP <index> [<ip_address>]
          View or set the IP Address.
       IPMASK/IPM/IM <index> [<ip_mask>]
          View or set the IP mask.
       GATEIPADDRESS/GIP/GI <index> [<gw_address>]
          View or set gateway IP address.
       TRACEFILESMAX/TFM/TF [<days>]
          View or set trace files max.
       HOSTMODE/HOM/HM [<mode>]
          View or set host mode. Valid modes: "Client", "CCMS", ...
       HOSTTIMER/HOT/HT [<seconds>]
          View or set host timer.
       CLTUSERPASSWORD/CPW/CW [<username,password>]
          View or set client user password.
       TIME/TIM/TI [<time>]
          View or set time.
       TIMEZONE/TIZ/TZ [<zone>]
          View or set timezone.
       NTPSVRIPADDRESS/NIP/NI [<index> <address>]
          View or set NTP server IP address.
       VERSION/VRN/VN <option> [<option_args>]
          Arguments:
             LIST - List available versions.
             SEARCH - Search for update files.
    	 EXTRACT - Extract update file.
    	 SELECT - Select from available versions.
       BANNER/BAN/BN <index> [<gw_address>]
          View the product banner.
Created By: Adtec Digital Inc