Skip to main content
Skip table of contents

Module Resources

In this part, we will demonstrate several images and the file structure to advance your knowledge about File Resources. Furthermore, you can customize your files with the available standard structures.

Overview

In this Module Resources document, you will understand and figure out how the files will be generated after creating a new project in Dart-IDE. It will help you to add or modify files flexibly according to your current requirements.

Resource Files

Project General Module Structure

The integrated module package must be compressed in ZIP format and declared with the ‘.dm’ extension. In the integrated module package, at least one sub-module package file (.dm) for Dart-Platform or Dart-Framework must be included.

  • drcf_module.dm is divided into ControlModule and CommunicationModule.

    • ControlModule : manifest.json + module.so

    • CommunicationModule : manifest.json + module image

Document - Guides - Advanced User Guide - Module Resources - dm file structure

This structure will be generated automatically when you create a new project file in Dart-IDE.

Below are the general items and their child files in module resources, which will be created as standard structures in EXPLORER panel.

Document - Guides - Advanced User Guide - Module Resources - Automatic Files Structure Generation

Automatic Files Structure Generation

You can get a better experience from the above image, which helps you link the content with the tables below.

  • Abbreviations: D directory - F file - M mandatory - O optional.

Item

M/O

Explanation

Important

1

D {module_package_name}

M

Root directory for integrated module project.

 

2

 

F manifest.json

M

Overall information about the integrated module package.

See ‘1.1. manifest.json (root)'

3

D assets

M

Resources directory required to display information about integrated module package.

 

4

 

D images

F icon.png

M

Contains image resources.

(e.g. module icon)

 

5

D module_for_dart-platform

O

Sub-module project directory for DART-Platform.

 

6

 

F manifest.json

M

Overall information about the DART-Platform module package.

See. '1.2. manifest.json (for DART-Platform)'.

7

 

F package.json

F package-lock.json

M

The configuration file tell about dependencies and other information to develop a DART-Platform module package.

Under the current policy, module developer can't use anything other than the libraries already defined in package.json.

8

 

F tsconfig.json

M

Configuration file to use TypeScript language in DART-Platform module package

 

9

 

F webpack.config.js

M

Webpack configuration file for building (bundling) the DART-Platform module package.

 

webpack.config.js

10

 

 

D libs

M

libraries directory

 

11

 

 

D dart-api

F dart-api.ts

F dart-api-math.ts

F package.json

M

DART-API for development of a DART-Platform module package.

  • The DART-API selected version in the DART-IDE’s project setting screen must be downloaded here.

  • Module developers should not be able to modify dart-api.ts.

12

 

D src

M

Sources directory for DART-Platform module package.

 

13

 

 

D assets

O

Resources directory for DART-Platform module package.

 

14

 

 

 

D images

F {file_name}.png

O

Contains image resources.

 

15

 

 

 

D styles

F {file_name}.(s)css

O

Contains custom style files (css, scss) which are needed to render UI.

 

16

 

 

 

D langs

O

Multilingual resources directory for strings used in manifest.json (for DART-Platform) and DART-Platform module package.

 

17

 

 

 

 

F index.ts

O

Object definition file for language resource files (json) that exist under langs

Required when providing language resources

18

 

 

 

 

F {language_code-REGION}.json

O

JSON format file containing resource information for each language

 

19

 

 

F declarations.d.ts

O

Configuration file to use '*.scss' file in DART-Platform module package.

If the developer uses the scss file, it should be added automatically at build time.

20

 

 

F index.ts(x)

M

Main script file for DART-Platform module package operation.

  • DART-Platform module package must have one main file.

  • Information about the file must be defined in manifest.json

  • '1.3. DART-Platform module package - refer to 'index.ts(x) (main) script file main code'

21

 

 

F {file_name}.ts(x)

O

Additional script files for DART-Platform module package operation.

 

22

 

 

F {file_name}.drl

O

File generated through 'DRL Generator' required for DART-Platform module package operation.

 

23

D module_for_drcf

O

Sub-module project directory for DRCF.

Detailed requirements will be communicated later.

24

 

 

F manifest.json

M

Overall information about the Dart-Framework module package.

 

25

 

 

F module.so OR module image

M

Dart-Framework module package.

  • Control Module : .so file

  • Communication Module : module image

 

Module component type

The DART-Platform module package can provide the following components.

Component type

Explanation

Screen

A component that provides a UI to the user by running through a module icon or other menu.

Service

A component that can be ran in the background depending on conditions intended by the developer.

 

Execution of Module component

Message & MessageFilter

DART-Platform system or any module component can execute another component of the module package through the object called Message as shown below.

  1. Define information about the module component to be executed (action, category, package, type, etc) in the Message object, and request to execute a component through ModuleScreenManager / ModuleServiceManager.

  2. Retrieve an appropriate module package for the requested message.

  3. Execute a component of a specifically selected module package.

Currently, module packages for each type must provide a screen component in which the following action / category is defined as messageFilter by default.

Module type

Required ModuleScreen and messageFilter information

Device Setting, User Command type modules

ModuleScreen for Setting View

  • dart.message.action.DEVICE_SETTING

  • dart.message.category.PIP_SCREEN

 

ModuleScreen for Property View

  • dart.message.action.USER_COMMAND

  • dart.message.category.PIP_SCREEN

Other type modules

Module Screen that can be executed through the module icon of Home (module)

  • dart.message.action.MAIN

  • dart.message.category.SCREEN

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.