pika technologies inc. analog logger application sample december 2009

18
PIKA Technologies Inc. Analog Logger Application Sample December 2009

Upload: branxton

Post on 07-Jan-2016

36 views

Category:

Documents


0 download

DESCRIPTION

PIKA Technologies Inc. Analog Logger Application Sample December 2009. What is it?. Sample Application developed in C++ Can be used to passively record calls from Analog HMP Card Works on HMP 2.7 platforms (Windows, Linux) with PIKA Analog PCIe Boards (FXO) and Warp FXO module - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: PIKA Technologies Inc. Analog Logger Application Sample  December 2009

PIKA Technologies Inc.Analog Logger Application Sample

December 2009

Page 2: PIKA Technologies Inc. Analog Logger Application Sample  December 2009

What is it?

• Sample Application developed in C++• Can be used to passively record calls from Analog

HMP Card• Works on HMP 2.7 platforms (Windows, Linux) with

PIKA Analog PCIe Boards (FXO) and Warp FXO module

• For Windows, a wav converter application is included to convert from raw to Wav format

Page 3: PIKA Technologies Inc. Analog Logger Application Sample  December 2009

Getting Started for the PC

• Install the PIKA Low Level HMP API on a PC ( 2.7.x or newer ) as described in the Getting Started Guide

• Install the PCIe board in the PC• Download, Compile, and run the Analog Logger

application• Requires proper trunk licenses to be installed.

Page 4: PIKA Technologies Inc. Analog Logger Application Sample  December 2009

Getting Started with the Warp

• Install PADS on a Linux PC as described in the PADS user’s Guide

• Build PADS with the AnalogLogger extra package• Download the image and run the AnalogLogger

application

Page 5: PIKA Technologies Inc. Analog Logger Application Sample  December 2009

Overall Architecture Description

• At start-up the application will create all the required instances. It will therefore create the System instance and its associated members.

• Each instance will communicate with the PIKA Driver (PKH_XXX) to configure and start it’s associated objects.

• For debugging purposes an event message logger (not to be confused with the analog logger) has been included to show events on the console and can also be injected to the PIKA Driver logs.

• The AnalogBoard instance contains a set of trunks that were detected.

Page 6: PIKA Technologies Inc. Analog Logger Application Sample  December 2009

Application thread Diagram

Main Application

Thread

PIKA Event

Thread

PIKA Driver

Spawn Thread

PIKA Event

PKH_BOARD_XXX

PKH_TRUNK_XXX

PKH_CHANNEL_XXX

PKH_RECORD_XXX

PKH_QUEUE_XXX

PKH_LOG_XXX

PKH_FSK_XXX

PKH_SYSTEM_XXX

Application QueueRaise event

Analog

Logger

package

WaitOnEvent

Initialize

Configure

Start

Stop

Cleanup

Application

Event Thread

Spawn Thread

Page 7: PIKA Technologies Inc. Analog Logger Application Sample  December 2009

AnalogBoard

Class Hierarchy and containment

Trunk

BaseEntity

LogClient

Logger (singleton)

1

n

System

1

n

Filemanager

(singleton)

Recorder

Fsk Rx

Dtmf Rx

1

11

1

Page 8: PIKA Technologies Inc. Analog Logger Application Sample  December 2009

Project Directory Description

• Docs : Document description• Linux: Linux Makefile• Source: Source Code related to this application• Windows: All Windows related project and solution

files.

Page 9: PIKA Technologies Inc. Analog Logger Application Sample  December 2009

Source Files Description

• application.h: Defines all Application related definitions.

• analogboard.cpp,.h : Analog Board class and method definition. Encapsulates Trunks instances.

• analoglogger.cpp : Main Application methods

• analogloggerconsole: Main Console application methods

• baseentity.cpp,.h: Base Class for all PIKA related objects.

• eventlistener.cpp, .h: Event Listener class and method definition used to propagate events to the application.

• eventqueue.cpp, .h: Event Queue class and method definition used to propagate events to the application.

• filemanager.cpp, .h: File Manager which hides OS-specific methods to save audio files.

• logclient.cpp, .h: Log Client is a base class used to propagate message information events to the console and log files.

Page 10: PIKA Technologies Inc. Analog Logger Application Sample  December 2009

Source Files Description

• logger.cpp, .h: Log Client interfaces with the Logger Class singleton object to propagate message information events to the console and log files.

• receivedtmf.cpp, .h: Used to configure the trunk to handle dtmf callerID.

• receivefsk.cpp, .h: Used to configure the trunk to handle FSK callerID.

• recorder.cpp, .h: Used to record audio speech onto a binary file.

• system.cpp, .h: System class and method definition. Encapsulates Analog boards.

• trunk.cpp, .h: Trunk class and method definition. Encapsulates Recorder, Receive DTMF and Receive FSK instances.

• WaveConverter.cpp, .h: Functions used to convert from raw to .wav files (Windows only)

Page 11: PIKA Technologies Inc. Analog Logger Application Sample  December 2009

Developing and building with PC boards

• Get the code onto the PC from either• Sample Code - HMP

• svn link

• For Windows with MS Visual Studio 2005• Open /windows/AnalogLogger/AnalogLogger.sln

• Build

• For Linux run make• # cd linux

• # make

Page 12: PIKA Technologies Inc. Analog Logger Application Sample  December 2009

Developing and building with Warp

• Install PADS on a Linux PC• Build PADS

• # make

• Build Analog Logger application• # make analoglogger

• Build image• # make image

Page 13: PIKA Technologies Inc. Analog Logger Application Sample  December 2009

Running the application

• From the command line run the application• # ./analoglogger

• For a list of parameters, add “-h”• # ./analoglogger –h

• Creates 2 directories• inprogress : in progress audio recordings

• complete : completed audio recordings

Page 14: PIKA Technologies Inc. Analog Logger Application Sample  December 2009

Output from running the Application

Page 15: PIKA Technologies Inc. Analog Logger Application Sample  December 2009

Customizing the application

• Event Processing• Handle specific events or all PIKA related events

• ProcessEvents for all PIKA related events• WaitOnEvent for Application specific events.

• File name control• Refer to Recorder::openFile()

Page 16: PIKA Technologies Inc. Analog Logger Application Sample  December 2009

C# application

• A C# application example exist in AnalogLogger.sln to demonstrate how one could interface with the analog logger as a DLL.

Page 17: PIKA Technologies Inc. Analog Logger Application Sample  December 2009

Reference Documentation

• PIKA HMP – Getting Started• PIKA HMP - Programmer’s Guide• PIKA HMP – API Reference Manual• PADS User’s Guide

Page 18: PIKA Technologies Inc. Analog Logger Application Sample  December 2009

Comments and feedback

• Add your feedback to the PIKA Forum.