• MARS Website
  • Core API
  • SmartOpenHamburg API
  • Model Components API
  • Common API
Show / Hide Table of Contents
  • Mars.Core
    • DependencyRegistrationCore
  • Mars.Core.Data
    • AbstractConfigLoader
    • AbstractEntityManager
    • AgentManagerImpl
    • DomainDataMediatorImpl
    • EntityManagerImpl
    • IAgentManager
    • IEntityManager
    • IEntityMapping
    • IGeneratedEntityLogger
    • IGeneratedLayerLogger
    • IGeneratedLogger<TModel>
    • IGeneratedTypeLogger
    • IModelCompiler
    • IOutputLogger
    • IPlatformSelector
    • ISchemaMigrationProvider
    • ISerializerManager
    • PlatformSelectorImpl
  • Mars.Core.Data.Compiler
    • AbstractEntityMapper
    • AbstractJitMapper
    • AbstractLayerMapper
    • AbstractMapper<TModel>
    • AbstractTypeMapper
    • RoslynCompilerUtils
  • Mars.Core.Data.Entities
    • CircleFilter
    • Condition
    • ConjunctiveWhere
    • DataFrame
    • DisjunctiveWhere
    • EqualityCondition
    • IntersectionFilter
    • ISelection
    • NearestFilter
    • Query
    • WindowFilter
    • WithinFilter
  • Mars.Core.Data.Exceptions
    • AgentInitializationException
  • Mars.Core.Data.Mapping
    • DefaultSourceProvider
    • ReflectiveMapping
  • Mars.Core.Data.Wrapper
    • AbstractOperationWrapper
    • AbstractWrapper
    • AbstractWrapper<TOptions>
    • GlobalRestrictions
    • ICircleQueryOperation
    • IIntersectionOperation
    • ILookupOperation
    • INearestOperation
    • IOperation
    • IPlatform
    • IQueryOperation
    • ISnapshot
    • IWindowQueryOperation
    • IWithinOperation
    • IWrapper
    • KnnGraphWrapper
    • PostGisWrapper
  • Mars.Core.Data.Wrapper.Document
    • IMongoConnection
    • IMongoWrapper
    • MongoDbIteratorHelper
    • MongoDbWrapper
  • Mars.Core.Data.Wrapper.File
    • AbstractFileWrapper<TOptions>
    • AscWrapper
    • GeoJsonWrapper
  • Mars.Core.Data.Wrapper.Memory
    • DataTableWrapper
    • GeoHashTrieWrapper
    • KdTreeWrapper
    • TripPosition
    • TripPositionCoordinateConverter
    • TripsCollection
    • TripsLineConverter
    • TripsTrajectoryWrapper
  • Mars.Core.Data.Wrapper.Relational
    • AbstractRelationalConnection
    • PostgresSqlDbConnection
    • PostgresSqlWrapper
    • RelationalMapperException
    • RelationalSqlWrapper<TOptions>
    • SqliteDbConnection
    • SqliteWrapper
  • Mars.Core.Data.Wrapper.Stream
    • MqttWrapper
    • SimulationTypeInfo
  • Mars.Core.Executor
    • IRuntimeModel
    • ISimulationProgress
    • IStepExecutor
  • Mars.Core.Executor.Entities
    • Parametrization
    • StepParam
  • Mars.Core.Executor.Implementation
    • RuntimeModelImpl
    • SimulationProgressImpl
    • StepExecutionUseCase
  • Mars.Core.Model
    • IConfigLoader
    • IModelContainer
    • IModelResolver
  • Mars.Core.Model.Entities
    • LayerInstanceContainer
  • Mars.Core.Model.Exceptions
    • InvalidMappingException
    • MissingConstructorException
    • ModelResolutionException
    • ValidationException
  • Mars.Core.Model.Implementation
    • DependencyBuilder
    • MappingHelper
    • ModelContainer
    • ValidationIssueLevel
    • ValidationResult
    • Validator
  • Mars.Core.Simulation
    • ISimulation
    • ISimulationControl
  • Mars.Core.Simulation.Entities
    • SimulationRestartArgs
    • SimulationWorkflowState

Interface IGeneratedLogger<TModel>

Inherited Members
IOutputLogger.ProxyKey
IOutputLogger.Type
IOutputLogger.TypeLogger
IOutputLogger.Mapping
IOutputLogger.OutputFrequency
IOutputLogger.OutputTicks
IOutputLogger.HasOutputProperties
IOutputLogger.Context
IOutputLogger.ConfigLoader
IOutputLogger.Culture
IOutputLogger.Initialize()
Namespace: Mars.Core.Data
Assembly: Mars.Core.dll
Syntax
public interface IGeneratedLogger<TModel> : IOutputLogger
Type Parameters
Name Description
TModel

Properties

| Improve this Doc View Source

Entity

The associated entity model object (either an agent or a layer) Is refined implemented in IGeneratedEntityLogger.
Declaration
TModel Entity { get; set; }
Property Value
Type Description
TModel
| Improve this Doc View Source

Id

Gets the Id of the entity which is cared by this mapping proxy
Declaration
Guid Id { get; set; }
Property Value
Type Description
System.Guid
| Improve this Doc View Source

IdString

Gets the serialized Id of the entity prepared for the output
Declaration
string IdString { get; }
Property Value
Type Description
System.String
Remarks
Use this when the entity id is used within the output

Methods

| Improve this Doc View Source

IsSerializable()

Checks for the current instance, based on precondition whether this instance shall be persisted or not.
Declaration
bool IsSerializable()
Returns
Type Description
System.Boolean Returns true when the instance can be serialized otherwise false
| Improve this Doc View Source

Serialize()

Serialize the snapshot of an agent with output properties as a MessagePack formatted byte field, encoded in hex. Instead of creating a new DataFrame struct the primitive output properties will be serialized directly. This MessagePack format is much more smaller and faster than just to use the Serialize() method, but for the client within the database or in the client programme (with another language) there an explicit MessagePack deserialization step necessary. MessagePack specification https://msgpack.org .Net binding of MessagePack with all options described https://github.com/neuecc/MessagePack-CSharp#performance
Declaration
byte[] Serialize()
Returns
Type Description
System.Byte[] A System.Byte array in MessagePack format
| Improve this Doc View Source

SerializeCompressed()

Serialize the snapshot of an agent with output properties as a MessagePack formatted byte field, encoded in hex and compressed by the LZ4 compression algorithm. Instead of creating a new DataFrame struct the primitive output properties will be serialized directly. This MessagePack format is much more smaller and faster than just to use the Serialize() method, but for the client within the database or in the client programme (with another language) there an explicit MessagePack deserialization step necessary. MessagePack specification https://msgpack.org LZ4 compression algorithm https://en.wikipedia.org/wiki/LZ4_(compression_algorithm) .Net binding of MessagePack with all options described https://github.com/neuecc/MessagePack-CSharp#performance
Declaration
byte[] SerializeCompressed()
Returns
Type Description
System.Byte[] A System.Byte array in MessagePack format compressed by the LZ4 algorithm.
| Improve this Doc View Source

SerializeProperties()

Serialize the values of all output properties by returning the actual values with the underlying property structure as an iterator.
Declaration
IEnumerable<(string, object, Type)> SerializeProperties()
Returns
Type Description
System.Collections.Generic.IEnumerable<System.ValueTuple<System.String, System.Object, System.Type>> Returns an iterator containing each output property value with the associated name, and the corresponding data type of this property. When no output properties are registered, then the iterator returns nothing.
Remarks
This method can be used to get the concrete values of an entity or layer or to generate the schema by using the returned property names.
| Improve this Doc View Source

SerializePropertyValues()

Serialize the values of all output properties by returning the actual value as an iterator.
Declaration
IEnumerable<object> SerializePropertyValues()
Returns
Type Description
System.Collections.Generic.IEnumerable<System.Object> Returns an iterator containing each output property value.
| Improve this Doc View Source

SerializeToDocument()

Serialize the output properties directly into a MongoDB.Bson.BsonDocument structure in which the document is always be reused for each tick. This document the whole output tree of the associated Entity.
Declaration
BsonDocument SerializeToDocument()
Returns
Type Description
MongoDB.Bson.BsonDocument Returns an updated MongoDB.Bson.BsonDocument for the current valid tick, containing the latest snapshot of the associated Entity
| Improve this Doc View Source

SerializeToJson()

Serialize the output properties directly as a JSON suited document. Based on the output configuration SimulationConfig, in default case, this DOES NOT include the property names as keys.
Declaration
string SerializeToJson()
Returns
Type Description
System.String A JSON formatted string of all output properties for the associated agent.

Extension Methods

Serializer.Save<T>(T, out Byte[], SerializerCompression)
Serializer.Save<T>(T, Stream, SerializerCompression)
Serializer.Save<T>(T, BinaryFormatter, Stream, SerializerCompression)
Serializer.Save<T>(T, String, SerializerCompression)
Serializer.Save<T>(T, String)
Matrix.Concatenate<T>(T, T[])
Matrix.Replace<T>(T, Object, Object)
DomainDataImporter.Import(Object, InputConfiguration)
ObjectSerialize.Serialize(Object)
Matrix.IsEqual(Object, Object, Decimal, Decimal)
  • Improve this Doc
  • View Source
In This Article
Back to top Copyright © MARS GROUP. HAW Hamburg