Sie sind auf Seite 1von 16

Conditional Access

System Module
(CASM)

Software Components

Application
Mainly responsible for interfacing with the
user
STB software
Verifier
Together provide the infrastructure necessary
for running the applications on STB

Then where is CASM?

CASM is part of STB software which provides


interface between the verifier and applications.
CASM is just POST MAN between the
application and Verifier
The CASM by itself doesnt do anything much.
Just post the events received from verifier in the
way that applications will understand

Kinds of Application

We have two kinds of applications,


Applications that use CA
Applications that do not use CA
Applications that use CA are of two typesEnhanced ApplicationsApplications that can properly handle entire scope of CA
interface.

Simple ApplicationsApplications that can use only small part of the CA


interface.

Service Routines and Events

The interface between


Application and Verifier is
handled by Service Routines
and Events
Application communicates to
verifier by calling service
routines (begins with
CaApi_)
Verifier communicates to
Application by sending
Events to the application
(begins with CA_EV_)
contains Event ID and
Payload

Application
Routines

Events

Verifier

Sending and Handling CA Events

General Notifications
Events that are initiated and sent by verifier in order to
notify an application about particular state
appearance or change
Eg: Card insertion and Removal

Responses to Requests
Events that are sent as a result of explicit or implicit
requests from the application.
Eg:

Exception Handling

Verifier places exception descriptor into CA payload when there


is any.
The same will be retained until same exception occurs with
IDLE exception code value or the same event without exception
descriptor all together.
Exception could be to display some message
Messages are two kinds1. Pre-defined text message (Applicaton)
2. Free text message (with exception)
Exception Code
Meaning
CA_SHOW_GENERAL_OSD
CA_SHOW_INFO
CA_IDLE_EXCEPTION

Wait for same again to remove it


Wait for input/for timeout
Remove previous

Exception message number is depicted as


0
1-EF
0xFD

- Clear message on the screen


- Pre-defined OSD number
- Message text present in the descriptor

Generic Verifier Descriptors

Service Identifier Descriptor (DVB triplet)


Stream Reference Descriptor (Number and type)
Data Source Descriptor (Xconnection)
Stream Reference Descriptor (Stream Num,
type)

Service Routines

CaApi_GetCaEventPayload (event_id, payload_handle, buf_size,


data_length, *data_buffer)
CaApi_GetCaEventPayloadLength (event_id, payload_handle,
*data_length)
CaApi_ReadRegionBytes (action, region_block,
*number_of_region_blocks, *region_block_length,*region_data)
Region Personal bytes from Card.
CaApi_SetCurrentLanguage (ca_ird_language)
CaApi_SetCustomerId (customer_id) Customer/Broadcaster
CaApi_SetUserPin (user_id,*old_pin,*master_pin,*new_pin)
Set PIN
CaApi_GetLimitProperties (limit_block, requested_limit_id,
*limit) Rating, Spending

Events From Verifier


CA_EV_CARD_STATUS
Card Status Desc Card Type and Status

CA_EV_CA_MODULE_CONFIG
Viewing Card Config Desc Card ID, Subs ID, Paired, Card Authorized
System Config Desc CaSystemID, SI filtering, Extended SI Filtering
Verifier Config Desc Ca API Version
Subscriber Config Desc Region, Country, Zip Code and Currency
Extended Config Desc Info Byte (Bit 7 XTV Subscriber)

Viewing Card Desc Card Paired, Subscriber ID

Events From Verifier (Cont..)

CA_EV_DISPLAY_MSG
OSD Msg desc msg no, text len, msg_lang, extra info.
CA_EV_CA_EVENT_STATUS
Control Word Desc Ent Type, Slot Type, Slot Num
Viewing Prob Desc Viewing Prob, Viewing lim, num prob,
num limits
CA_EV_NUMBER_OF_PURCHASE_OPTIONS
Option Number Desc Purchase problem and number of
options
CA_EV_CHAINING_STATUS
Chaining Status Descriptor

CA Viewing Status

It is the intention of the


EV_CA_EVENT_VIEWING_STATUS events to convey the
viewing status of the elementary streams that form the currently
running program. It in no way conveys whether the elementary
stream(s) are purchasable or not.
The event viewing status will only be sent to the Application
when a service is selected that has CA associated (i.e. that has at
least one ECM associated) and will only ever be sent for the
currently running program. If the status of an elementary stream
changes then the viewing status event will be resent to the
Application

Viewing Scenario
: APP

: CASM

EV_CA_EVENT_VIEWING_STATUS {problem = CA_PROBLEM_PARENTAL_LIMIT_EXCEED_MASK}


APP at this point should render the Parental
Rating PIN Screen
APICaUserVerifyPassword() -> GCA_OK
APICaUserDisableRestrictions() -> GCA_OK

EV_CA_EVENT_VIEWING_STATUS {problem = 0}

CA Purchase Status

It is the intention of the


EV_CA_EVENT_PURCHASE_STATUS events to convey
whether something is purchasable within a program event. The
purchase status event is sent under two circumstances:
As a result of future program event enquiry using the function
call APICaEventEnquiry(). (The APICaEventEnquiry function
does not support an FECM enquiry for the present event).
Automatically for the currently selected program.
An Application is only permitted to enquire the purchase options
of a program event if it has received a purchase status event
indicating that purchase options are available.
FP, Purchasable and Non-Purchasable

Purchase Scenario
: APP

: CASM

EV_CA_EVENT_VIEWING_STATUS

EV_CA_EVENT_PURCHASE_STATUS {purchasable = CA_EVENT_STATUS_PURCHASE_POSSIBLE_MASK}

APICaEventGetFirstPurchaseOption() -> GCA_OK_MORE_OPTIONS_AVAILABLE

APICaEventGetFirstPurchaseOption() -> GCA_OK_MORE_OPTIONS_AVAILABLE

APICaEventGetFirstPurchaseOption() -> GCA_OK_NO_MORE_OPTIONS_AVAILABLE


The APP should then process and
render these options to the subscriber.
The subscriber should choose which
option(s) to purchase.

APICaEventPurchase() -> GCA_OK

PL_CA_EVENT_ACCOUNT_SLOT_UPDATE

OSD Messages

OSD Messages may be rendered as a response to one of the following:


EV_CA_CARD_STATUS event
If the OSD is card status related then the OSD message should only
be removed when a new card status is entered, in which case the OSD
for this new status should be displayed. If the new status is
CA_CARD_READY then no OSD should be displayed.
EV_CA_VIEWING_PROBLEM event
If the OSD is viewing problem related then the OSD message should
only be removed when the associated bit is un-set in a new
PL_CA_EVENT_VIEWING_STATUS event or on service change.
APICaEventGetFirst/NextPurchaseOption() /
APICaEventPurchase() call
If the OSD is purchase problem related then the OSD message should
be displayed until either user interaction occurs or (optionally) an
application defined timeout occurs
Priority

Das könnte Ihnen auch gefallen