# My Weekly Report
* Major Subject: AIoT服務建置
* Course Link: [ThingWorx初學指南](https://hackmd.io/@RenJhang/SkGo0lKHU#Course-Handouts)
* Preface:
:::warning
### Personal Information
>Name: 王昱鈞/James Wang
>Department: 電子工程系/Electronic and Computer Engineering
>Email: james237.wang@gmail.com, B11002123@mail.ntust.edu.tw
:::
---
## 3/28 ~ 4/3
::: success
### Finish Part
- WISE-PaaS Core Level 2
- [x] Dashboard 實作
:::
## 3/21 ~ 3/27
::: success
### Finish Part
- WISE-PaaS Core Level 2
- [x] DataHub
- [x] EdgeLink & SCADA
:::
## 3/14 ~ 3/20
::: success
### Finish Part
- [x] WISE-PaaS Core Level 1
:::
## Week 7
::: success
### Finish Part
- [x] 第7章
- [x] 第8章
- [x] 第9章
- [x] 第10章
:::
* [第7章](https://140.118.122.115:5033/Thingworx/Composer/index.html#/modeler/details/Mashup~Tracg_Mashup7/design)
* [第8章](https://140.118.122.115:5033/Thingworx/Composer/index.html#/modeler/details/Mashup~Tracg_Mashup8/design)
* [第9章](https://140.118.122.115:5033/Thingworx/Composer/index.html#/modeler/details/Mashup~Tracg_Mashup9_Mail/design)
* [第10章](https://140.118.122.115:5033/Thingworx/Composer/index.html#/modeler/details/Mashup~Tracg_Mashup10_Map/design)
## Week 6
* 段考週
## Week 5
::: success
### Finish Part
- [x] 第四章
- [x] 第五章
- [x] 第六章
:::
* [第四章](https://140.118.122.115:5033/Thingworx/Runtime/index.html?mashup=Tracg_Mashup3&forceClose=true&__enableBMF=true&__fromNextGen=c991df33-dc66-44a4-929e-5de663022c71&features=)
* 第五章
* [RemoteThing](https://140.118.122.115:5033/Thingworx/Composer/index.html#/modeler/details/Thing~Tracg_RemoteThing/properties)
* [DataTable](https://140.118.122.115:5033/Thingworx/Composer/index.html#/modeler/details/Thing~Tracg_DataTable_Sensor/services)
* [第六章](https://140.118.122.115:5033/Thingworx/Runtime/index.html?mashup=Tracg_Mashup6&forceClose=true&__enableBMF=true&__fromNextGen=b9abe891-9e46-4593-b4e9-e9b8142f8d88&features=)
## Week 4 (12/27~12/31)
::: success
### Finish Part
- [x] 第三章
- [x] 成績
:::
* [成績](https://140.118.122.115:5033/Thingworx/Runtime/index.html?mashup=Tracg_Meshup2&forceClose=true&__enableBMF=true&__fromNextGen=f08e98ec-39f7-4cea-baaa-61e54f6e60c3&features=)
## Week 3
::: success
### Finish Part
- [x] 第二章
- [x] 計算機
- [x] Gauge
- [x] 時間格式轉換
:::
* [計算機](https://140.118.122.115:5033/Thingworx/Runtime/index.html?mashup=Tracg_Mashup&forceClose=true&__enableBMF=true&__fromNextGen=82de515e-1f8c-435f-b8b6-4d945f73036c&features=)
* [Gauge](https://140.118.122.115:5033/Thingworx/Runtime/index.html?mashup=Tracg_Mashup&forceClose=true&__enableBMF=true&__fromNextGen=82de515e-1f8c-435f-b8b6-4d945f73036c&features=)
* [時間格式轉換](https://140.118.122.115:5033/Thingworx/Runtime/index.html?mashup=Tracg_Meshup2&forceClose=true&__enableBMF=true&__fromNextGen=7dab8db4-ac84-403f-a787-23a05b7c5e62&features=)
## Week 2
::: success
### Finish Part
- [x] 第一章結束
- [x] 第二張簡易計算機
:::
:::warning
⚠️之後要上圖片
:::
### Implementation Of Lesson 1
4. Create the connection between Meshup "**Tracg_Mashup**" and Service "**TestMethod**"
5. Change content of Mashup "**Tracg_Mashup**"
* Add Widgets Textbox "**ptcstextfield-6**"
* Create connection between Property "**Text**" of "**ptcstextfield-6**" and Parameter "**TestInput**" of "**TestMethod**"
* Create connection between Parameter "**result**" of "**TestMethod**" and Property "**LabelText**" of "**ptcslabel-5**"
* Let Event "**Clicked**" trigger Method "**TestMethod**"
6. Create Style Definition "**Tracg_Style**"
* Change Text Color to *#5bb73b*
### Guide of Lesson 2 --- 簡易計算機
#### 功能介紹
有兩個輸入項,並有四個分別為加減乘除的按鈕。使用者在輸入兩個輸字和點選按鈕後,按下計算鈕即有答案。
#### 所需Mashup Widget
* Label
* Button
* Button Bar
* Numeric entry
#### 流程解說
1. 建立State Definitions
類似宣告一個物件,新增的按鈕套上State Definitions就可以直接有想要的功能與外觀。
* 在內新增四個按鈕,分別為"**+**","**-**","**\***","**/**"
2. 回到Mashup,將Widget拖移至適當位置
3. 在Thing中建立Service,並寫入程式
```javascript=
var result, Num1, Num2, OperButton;
switch(OperButton){
case 1 :
result=Num1+Num2;
break;
case 2 :
result=Num1-Num2;
break;
case 3 :
result=Num1*Num2;
break;
case 4 :
result=Num1/Num2;
break;
}
```
5. 把Widget的Property跟Service連上,讓他們能夠連動
6. 測試,完成!
:::info
### Weekly Review
* 以實作為主,因為IoT在實作的佔比較高
* 筆記部分以補充為主,不需要整頁整理下來
* 進度要更多
:::
## Week 1 (12/6~12/10)
::: success
### Finish Part
- [x] 第一章前半(建立連結前)
:::
### Implementation Of Lesson 1
1. Add Project "**Tracg_BMW-Lab**"
2. Add Mashup "**Tracg_Mashup**"
* Add Panel "**panel-3**"
* Add Widgets Button "**ptcsbutton-4**"
* Add Widgets Label "**ptcslabel-5**"
3. Add Things "**Tracg_TestService**"
* Add Properties "**Testvariable**"
* Add Services "**TestMethod**"
* Add Inputs "**TestInput**"
* Add Code
```javascript=
var result = TestInput ;
```