Skip to content

logo


Title: Eco.Log1 Software Component Specification

USPD: US.ECO.00002-01 90
Component Name: Eco.Log1
Short Description (max 300 char.): implements core EcoOS API, including microkenel with Interface bus
Component Use Category: MULTIPURPOSE
Component Type: UTILITY
CID: 97322B6765B74342BBCE38798A0B40B5
Marketplace URL: https://ecoos.dev/product/743b7efa-7d04-4811-8ebb-d9308d6bfe58
Status: Draft
Modified Date: November 8th, 2021
Version: 1.0

Tags: Logging, Log, trace

AuthorsCompany
Vladimir BashevPEERF

1. Overview

This document describes the requirements for the implementation of the Eco.Log1 component.

1.1. Introduction

Description.

1.2. Notes

  • Keywords

1.3. Links

This paragraph contains the component’s marketplace url and links to other helpful information to better understand this document:

Available in marketplace (registry) at: https://ecoos.dev/product/743b7efa-7d04-4811-8ebb-d9308d6bfe58

Table of Contents

1. Overview

1.1. Introduction

1.2. Notes

1.3. Links

2. Eco.Log1 Component

3. IEcoLog1 Interface

3.1. IEcoLog1 component’ IDL descriptor

3.1.1. AddAffiliate function

3.1.2. set_LevelMask function

3.1.3. get_LevelMask function

3.1.4. Debug function

3.1.5. Info function

3.1.6. Warn function

3.1.7. Error function

3.1.8. Fatal function

3.1.9. DebugFormat function

3.1.10. InfoFormat function

3.1.11. recvmmsg function

3.1.12. WarnFormat function

3.1.13. ErrorFormat function

3.1.14. FatalFormat function

3.1.15. HexDump function

3.1.16. BinDump function

4. IEcoLog1Affiliate Interface

4.1. IEcoLog1Affiliate IDL descriptor

4.1.1. get_Name function

4.1.2. get_Layout function

4.1.3. set_Layout function

4.1.4. Write function

5. IEcoLog1Layout Interface

5.1. IEcoLog1Layout IDL descriptor

5.1.1. get_Name function

5.1.2. Format function

6. IEcoLog1ConsoleAffiliate Interface

6.1. IEcoLog1ConsoleAffiliate IDL descriptor

6.1.1. g

_

TargetOutp

function

6.1.2. set_TargetOutp

function

7. IEcoLog1FileAffiliate Interface

7.1. IEcoLog1FileAffiliate IDL descriptor

7.1.1. get_FileName function

7.1.2. set_FileName function

8. IEcoLog1SimpleLayout Interface

8.1. IEcoLog1SimpleLayout IDL descriptor

8.1.1. get_Pattern function

8.1.2. set_Pattern function

9. Error codes

Appendix A: Training programs

2. Eco.Log1 Component

The Eco.Log1 component implemets logging functionality
The component has the following description:

3. IEcoLog1 Interface


3.1. IEcoLog1 interface IDL descriptor

cpp
import "IEcoBase1.h"  
[  
object,  
uguid(F3B19793-BD14-4E9F-B7EA-64EDF4B6453F),  
]  
interface IEcoLog1 : IEcoUnknown {  
  
int16_t	AddAffiliate	 ([in] IEcoLog1Affiliate* pIAffiliate);  
  
void	set_LevelMask	([in] uint16_t mask);  
  
uint16_t	get_LevelMask	([in] void);  
  
void	Debug	([in] char_t* message);  
		  
void	Info	([in] char_t* message);  
  
void	Warn	([in] char_t* message);  
  
void	Error	([in] char_t* message);  
  
void	Fatal	([in] char_t* message);  
  
void	DebugFormat	([in] char_t* format,	...);  
		  
void	InfoFormat	([in] char_t* format, 	...);  
		  
void	WarnFormat	([in] char_t* format, 	...);  
		  
void	ErrorFormat	([in] char_t* format,	 ...);  
		  
void	FatalFormat	([in] char_t* format,	 ...);  
		  
void	HexDump	([in] char_t* data,	[in] uint32_t* size);  
		  
void	BinDump	([in] uint32_t* data,	[in] byte_t* bits);  
}

3.1.1. AddAffiliate function

The function

3.1.2. set_LevelMask function

The function

3.1.3. get_LevelMask function

The function

3.1.4. Debug function

The function

3.1.5. Info function

The function

3.1.6. Warn function

The function

3.1.7. Error function

The function

3.1.8. Fatal function

The function

3.1.9. DebugFormat function

The function

3.1.10. InfoFormat function

The function

3.1.11. recvmmsg function

The function

3.1.12. WarnFormat function

The function

3.1.13. ErrorFormat function

The function

3.1.14. FatalFormat function

The function

3.1.15. HexDump function

The function

3.1.16. BinDump function

The function

4. IEcoLog1Affiliate Interface

4.1. IEcoLog1Affiliate interface IDL descriptor

cpp
import "IEcoBase1.h"  
[  
object,  
uguid(6A744539-3376-4D4B-BF3C-1FABE5BBC18F),  
]  
interface IEcoLog1Affiliate : IEcoUnknown {  
  
char_t*	get_Name	([in] void);  
  
IEcoLog1Layout*	get_Layout	([in] void);  
  
void	set_Layout	([in] IEcoLog1Layout* pILayout);  
  
int16_t	Write	([in] uint16_t level,	[in] char_t* data,	[in] uint32_t size);  
}

4.1.1. get_Name function

The function

4.1.2. get_Layout function

The function

4.1.3. set_Layout function

The function

4.1.4. Write function

The function

5. IEcoLog1Layout Interface

5.1. IEcoLog1Layout interface IDL descriptor

cpp
import "IEcoBase1.h"  
[  
object,  
uguid(7596A090-3847-44EA-BEDB-EA4F4EEE5DA1),  
]  
interface IEcoLog1Layout : IEcoUnknown {  
  
char_t*	get_Name	([in] void);  
  
char_t*	Format	([in] uint16_t level,	[in] char_t* data,	[in] uint32_t size);  
}

5.1.1. get_Name function

The function

5.1.2. Format function

The function

6. IEcoLog1ConsoleAffiliate Interface

6.1. IEcoLog1ConsoleAffiliate interface’ IDL descriptor

cpp
import "IEcoBase1.h"  
import "IEcoLog1.hpp"  
[  
object,  
uguid(FECB29A2-3D60-4501-9F83-47C4752CFA3A),  
]  
interface IEcoLog1ConsoleAffiliate : IEcoLog1Affiliate {  
  
char_t*	get_TargetOutput	([in] void);  
  
void	set_TargetOutput	([in] char_t* name);  
}

6.1.1. get_TargetOutput function

The function

6.1.2. set_TargetOutput function

The function

7. IEcoLog1FileAffiliate Interface

7.1. IEcoLog1FileAffiliate interface’ IDL descriptor

cpp
import "IEcoBase1.h"  
import "IEcoLog1.hpp"  
[  
object,  
uguid(22B0B071-478D-461A-9F5B-5F40D4D79B7A),  
]  
interface IEcoLog1FileAffiliate : IEcoLog1Affiliate {  
  
char_t*	get_FileName	([in] void);  
  
void	set_FileName	([in] char_t* name);  
}

7.1.1. get_FileName function

The function

7.1.2. set_FileName function

The function

8. IEcoLog1SimpleLayout Interface

8.1. IEcoLog1SimpleLayout interface’ IDL descriptor

cpp
import "IEcoBase1.h"  
import "IEcoLog1.hpp"  
[  
object,  
uguid(9485C6A5-2CBF-4D46-B8B5-94F60740BEE3),  
]  
interface IEcoLog1SimpleLayout : IEcoLog1Layout {  
  
char_t*	get_Pattern	([in] void);  
  
char_t*	set_Pattern	([in] char_t* name);  
}

8.1.1. get_Pattern function

The function

8.1.2. set_Pattern function

The function



9. Error codes

The following table contains the error codes.

Error codeValueDescription
ERR_ECO_SUCCESES0x0000Operation successful.
ERR_ECO_UNEXPECTED0xFFFFUnexpected condition.
ERR_ECO_POINTER0xFFEENULL was passed incorrectly for a pointer value.
ERR_ECO_NOINTERFACE0xFFEDNo such interface supported.
ERR_ECO_COMPONENT_NOTFOUND0xFFE9The component was not found.

Appendix A: Training programs