• 沒有找到結果。

第三章 系統設計

3.2 維運機制

3.2.2 模組購買與佈署

系統安裝與初始化設定完成後,就可至 Service Store(圖 3.1)購買並下載想要的 智慧服務軟體所需元件。本論文假設使用者能夠透過超商購買 Home Service Store 網 站之代幣卡,並從代幣卡上得到一組序號,利用手機進入 Home Service Store,使用 Google 帳號密碼登入服務商店,輸入代幣卡上的序號,即可將購買的代幣存入此帳戶 的電子錢包中,每一組代幣卡之序號只能使用一次。當使用者完成服務購買後,Home Service Store 會將使用者的購買資訊記錄在資料庫中,並通知服務供應廠商的 ACS Server(ACS),ACS 也會將顧客的購買服務資訊記錄在 database 中。CPE 會定期向 ACS 發出 Inform 封包,以獲得新購買的服務的安裝資訊以及模組最新版本資訊,封包 中包含event code “ 2 PERIODIC ”,當 ACS 收到通知,會檢查 database 中使用者所有 DU 的版本資訊,若使用者有新購買的 DU,則 CPE 會立即向 ACS 發出 Inform “ M ChangeDUState ”通知,ACS 收到後則呼叫 CPE methods 的 ChangeDUState 方法,告 知 CPE 使用者所購買的新服務資訊,可供 CPE 下載,並傳入資料庫中下載連結的資 DUStateChangeComplete 方法,回報安裝 DU 的狀態,最後 ACS 會 UPDATE 資料庫

(acsdb)的 DU_Manage table 的版本(version);若下載失敗,CPE 會在呼叫 RPC Method 中的 DUStateChangeComplete 方法時,傳入適當的 FaultStruct(Fault Code、Fault String),

如:Fault Code = 9017 代表無法完成下載。CWMP 規範 DUStateChangeComplete 方法

表 3.1 DUStateChangeComplete 方法中定義的 CPE Fault Codes

Fault code Description Type

9001 Request denied(no reason specified) Server

9003 Invalid arguments Server

9012 File transfer server authentication failure (associated with Upload, Download, TransferComplete, Autonomous TansferComplete, DuStateChangeComplete, or AutonomousDuStateChangeComplete methods).

Server

9013 Unsupported protocol for file transfer (associated with Upload, Download, ScheduleDownload, DUStateChangeComplete, or

AutonomousDUStateChangeComplete methods).

Server

9015 File transfer failure: unable to contact file (associated with Download,

TransferComplete, AutonomousTransferComplete, DUStateChangeComplete, or AutonomousDUStateChangeComplete methods).

Server

9016 File transfer failure: unable to access file (associated with Download,

TransferComplete, AutonomousTransferComplete, DUStateChangeComplete, or AutonomousDUStateChangeComplete methods).

Server

9017 File transfer failure: unable to complete download (associated with Download, TransferComplete, AutonomousTransferComplete, DUStateChangeComplete, or AutonomousDUStateChangeComplete methods).

Server

9018 File transfer failure: file corrupted or otherwise unusable(associated with Download, TransferComplete, AutonomousTransferComplete,

DUStateChangeComplete, or AutonomousDUStateChangeComplete methods).

Server

9022 Invalid UUID Format (associated with DUStateChangeComplete, or

AutonomousDUStateChangeComplete methods: Install, Update,and Uninstall)

Server

9023 Unknown Execution Environment(associated with DUStateChangeComplete, or AutonomousDUStateChangeComplete methods: Install only)

Server

9024 Disabled Execution Environment(associated with DUStateChangeComplete, or AutonomousDUStateChangeComplete methods: Install, Update, and Uninstall)

Server

9025 Deployment Unit to Execution Environment Mismatch(associated with

DUStateChangeComplete, or AutonomousDUStateChangeComplete methods:

Install and Update)

Server

9026 Duplicate Deployment Unit (associated with DUStateChangeComplete, or AutonomousDUStateChangeComplete methods: Install only)

Server

9027 System Resources Exceeded (associated with DUStateChangeComplete, or AutonomousDUStateChangeComplete methods: Install and Update)

Server

9028 Unknown Deployment Units(associated with DUStateChangeComplete, or AutonomousDUStateChangeComplete methods: Update and Uninstall)

Server

9029 Invaild Deployment Unit State(associated with DUStateChangeComplete, or AutonomousDUStateChangeComplete methods: Install, Update and Uninstall)

Server

9030 Invaild Deployment Unit Update – Downgrade not permitted (associated with DUStateChangeComplete, or AutonomousDUStateChangeComplete methods:

Update only)

Server

9031 Invaild Deployment Unit Update – Version not specified(associated with DUStateChangeComplete, or AutonomousDUStateChangeComplete methods:

Update only)

Server

9032 Invaild Deployment Unit Update –Version already exists(associated with DUStateChangeComplete, or AutonomousDUStateChangeComp lete methods:

Update only)

Server

‧ 國

立 政 治 大 學

N a tio na

l C h engchi U ni ve rs it y

24

圖 3.3 服務購買與佈署程序

當使用者購買的付費元件(DU,PerSAM 中的 PSM 或 Worker Node)都已由 PHM 隨機安裝在家中的某台 Host 上,此時只要其服務所需的 worker node 足夠,服務就能

中的 du_manage table 的版本(du_version)欄位進行檢查,比對 CPE 的 DU 模組版本 是否與服務所發行的最新版本(du_latest_version)相符,若相符則不需要進行版本更 新;反之,若此 DU 模組不為最新版本,則 CPE 會立即向 ACS 發出 Inform “ M ChangeDUState ”通知,ACS 收到後,呼叫 CPE methods 中的 ChangeDUState 方法,並 提供最新版本的 DU 模組下載連結(du_downloadlink)資訊,讓 CPE 下載最新的模組 版本。當 CPE 進行模組更新完成後,CPE 會發出 Inform “ 11 DU STATE CHANGE

相關文件