• Guides
  • Videos
  • Publications
  • API
  • Github
  • Community
  • Release Notes
  • Plugins
Installing Origen
  • Introduction
  • How to Install
  • How to Install (Windows)
  • Company Customization
  • Understanding Gems
  • Invoking Considerations
  • Workspace Management
Getting Started with Origen
  • Core concepts
  • Creating a New App
  • Directory Structure
  • The Initial Commit
  • Creating New Files
  • Understanding Blocks
  • Application Architecture
Runtime Environment
  • Introduction
  • Mode
  • Environment
  • Target
  • Production Targets
  • Global Setup
  • Load Order
  • Programming
Models
  • Introduction
  • Naming
  • Definition & Hierarchy
  • Adding Attributes
  • Versioning
  • Bugs & Features
  • Package, Mode & Configuration
  • Registers
  • Pins
  • Power Domains
  • Hardware Attributes
  • Parameters
  • Specifications
  • Fuses
  • Generic Components
  • Creating Your Own Components
Compiler (Views)
  • Introduction
  • Creating Templates
  • Using Sub-Templates
  • Helpers
  • Running The Compiler
  • Inline Compiler
Controllers
  • Introduction
  • Shadow Controllers
  • Direct Controllers
Pattern Generator
  • Introduction
  • Creating Patterns
  • Pins
  • Timing and Waiting
  • Registers
  • Documenting Patterns
  • Generating by Name
  • Common API
  • J750 API
  • V93K API
  • UltraFlex API
  • STIL & Other Formats
  • Custom Testers
  • Running The PatGen
  • Concurrent Patterns
Test Program Generator
  • Introduction
  • Philosophy
  • Creating Flows
  • Managing Flow Control
  • Creating an Interface
  • Additional Resources
  • Dynamic Custom Code
  • Characterization API
  • J750 API
  • V93K Common API
  • V93K SMT7 API
  • V93K SMT8 API
  • UltraFLEX API
  • Documenting the Program
  • Creating Custom Testers
  • Running the ProgGen
Decompilation
  • Overview & Example
  • Decompiling, Adding Pins, & Executing
  • Working with Decompiled Patterns
  • Platform Specifics
Simulation
  • Introduction
  • How It Works
  • Compiling the DUT
  • AMS Support
  • Environment Setup
  • Application Setup
  • Simulating Patterns
  • Simulating Flows
  • Direct DUT Manipulation
  • Simulator Log Output
  • Artifacts
  • Debugging
Documentation Generator
  • Introduction
  • Markdown
  • Linking
  • Styling
  • Testing
  • API Generation
  • Deploying
Plugins
  • Introduction
  • Using a Plugin
  • Creating a Plugin
  • Current & Default Plugins
  • Dev Environment
  • Dev Considerations
  • Paths & Origen.root
  • Config & Origen.app
Miscellaneous
  • Revision Control
  • Origen Remotes
  • Lint Testing
  • Session Store
  • LSF API
  • Users, Emails & Maillists
  • Utilities & Helpers
  • Ruby Extensions
  • Logger
  • Adding Commands
  • Overriding Commands
  • Callbacks
  • Application Callbacks
  • Miscellaneous Topics
Advanced Topics
  • Introduction
  • Invocation Customization
  • Custom App Generators

Miscellaneous

Users, Emails & Maillists


This guide describes some APIs that are available to customize the output or behavior of your application to the current user, or to send emails to the current user or a group of users.

To access an object representing the current user simply call User.current and from there many attributes can be accessed:

User.current                # => <user object>
User.current.name           # => "John Doe"
User.current.email          # => "johndoe@example.com"

See the User API for a full list of available attributes. Note that this is contingent on the current user setting up their name and email as described here.

User objects for 3rd parties can be created by supplying a name and/or email like this:

thao = User.new("thao@example.com")
thao = User.new("thao@example.com", "Thao Huynh")

LDAP Integration

Origen can be integrated with an LDAP employee directory, to enable this configure the LDAP attributes in your company’s Origen configuration. To look up a user within the LDAP system an ID is required, by default Origen will take the login name of the current Linux user as there ID.

User objects can now be created by supplying a single ID argument:

thao = User.new("b53254")

To see the full information that is available for a user:

User.new("b53254").display   # => Prints a listing of all information available

All attributes returned by your LDAP system will have accessors, in most cases these will return an array:

User.new("b53254").country    # => ["Vietnam"]

Sending Emails

If details of your company’s email server have been added to your company’s Origen configuration, then you can easily send emails from your application.

An email can be sent to a given user by calling the send method on the user object, try this in the console to send yourself an email:

User.current.send subject: "Hello", message: "Origen is cool!"

Multi-line emails can be composed using Ruby’s multi-line string syntax:

user = User.new("b53254")

user.send subject: "Hello", message: <<-END
Hi #{user.name},

This is just a short email, to say hello!

Cheers,
#{User.current.name}
END

Group emails can be sent by talking to the Origen mailer directly, an array of user objects or email addresses can be given to the :to option:

message = <<-END
Hi All,

Just to say have a nice day!

Thanks,
#{User.current.name}
END

distribution_list = [User.new("r49409"), User.new("r6aanf")]

Origen.mailer.send_email(subject: "Hello", to: distribution_list, body: message)

Maillists

Origen uses maillists to send notifications of development and production releases. The maillist files should be located at config/maillist_dev.txt and config/maillist_prod.txt

Sample lists:

# config/maillist_dev.txt
#
# Product team X  (handles commenting like this)
first.last@company.com
john.smith@company.com
# config/maillist_prod.txt
#
# Some other product team
memory.expert@company.com       # Memory Test Lead (commenting like this is ok too)
# Example of an ID only
last.first
x49509

To get a list of your application’s mailists:

Origen.app.maillist_dev    # => [<first.last@company.com>, <john.smith@company.com>]
Origen.app.maillist_prod   # => [<memory.expert@company.com>, <last.first@MYcompany.com>, <x49509@MYcompany.com>]

You can pass the returned array directly to the send_email method:

Origen.mailer.send_email(subject: "Hello", to: Origen.app.maillist_dev, body: "Hello to all developers!")
For a more in-depth look at the mailer and how it is setup, see the mailer section utilities page

Comments

Generated with the Origen Semiconductor Developer's Kit

Origen is released under the terms of the MIT license